Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
6,374,834
1
6,374,884
null
0
608
So I have my web service which is a WCF and it supports JSON. When i enter this url [http://localhost/HelloWorldWebService/HelloWorld.svc/getperson](http://localhost/HelloWorldWebService/HelloWorld.svc/getperson) in my browser it returns {"GetPersonResult":{"FirstName":"John","LastName":"Doe"}} Now I have the following jquery: ``` function CallService() { $.ajax({ url: "../HelloWorldWebService/HelloWorld.svc/getperson", type: "GET", dataType: "json", processdata: true, contentType: "application/json; charset=utf-8", success: function (msg) { alert('success'); }, error: function (xhr, status, error) { alert(xhr.responseText); } }); } $(document).ready(function () { CallService(); }); ``` it shoes the success pop-up ... how can I show the content of the msg in my pop-up? I tried alert(msg) but it shows [object Object] ??? EDIT: This is what i get when using Firebug with console.log(msg) ![enter image description here](https://i.stack.imgur.com/LzxNf.png) So how do I access the FirstName to display it in the alert? EDIT: So finally found out how the syntax works. So to get the firstname I had to do alert(msg.GetPersonResult.FirstName);
Jquery calling my wcf web service. How to view the returned json?
CC BY-SA 3.0
null
2011-06-16T15:55:34.280
2011-06-16T17:59:41.443
2011-06-16T17:59:41.443
159,527
159,527
[ "jquery", "wcf", "web-services" ]
6,374,842
1
6,379,198
null
0
549
I've just started learning to develop blackberry apps and I've hit a bit of a snag. I'm unsure how I could move around a background image that is large than the field/manager it is being applied to. Here's an image to illustrate what I mean: ![enter image description here](https://i.stack.imgur.com/tpT5s.jpg) So far I have tried adding a to a inside a thinking I would be able to set the size of the absolute manager and just move the bitmapfield around inside it. That isn't the case, the manage just takes the size of the content inside it :( I come from a frontend web dev background so what I'm looking for is something that behaves similar to the 'background-position' attribute in css or some sort of image mask. Thanks in advance! This is a code sample of where I have got to. I now have a custom sized manager that displays a chunk of a larger BitmapField. I just need a way to move that BitmapField around.
blackberry 5.0 api image mask/background image position
CC BY-SA 3.0
null
2011-06-16T15:56:15.787
2011-06-16T22:06:34.290
2011-06-16T16:31:05.890
295,852
295,852
[ "blackberry", "blackberry-eclipse-plugin", "blackberry-jde" ]
6,375,324
1
6,396,753
null
0
78
![Demo Tables](https://i.stack.imgur.com/yAoOn.jpg) As you can see, I have got 2 tables here, table 1 and table 2. The column in Table 1 is an identity column. Table 2 is like a child table of table 1, where we can link table 2 with table 1 by using column. Now what I would like to achieve is to sort of replace the original , i.e. 1,2,3 with the new ones, i.e. 4,5,6, while in the mean time we keep its original unchanged. And then we will insert it back into table 2. I find replacing new srids is a bit challenging and get stuck. So what query/script should I write to achieve this? Thanks.
Replace original srids with new ones
CC BY-SA 3.0
null
2011-06-16T16:29:30.033
2011-06-18T14:43:46.973
null
null
786,796
[ "sql", "tsql", "sql-server-2008", "stored-procedures", "insert" ]
6,375,519
1
6,375,615
null
0
2,468
I need to connect to a Microsoft SQL server using Java. I downloaded the driver, an no matter what I did elipse and netbeans could not find the driver. When I got frustrated I downloaded also MySql driver, and again I get the same exception. I added the drivers path in the environmental variables and also included the jar files in my project library. Here is a picture of my project: ![pic](https://i.stack.imgur.com/zA1VT.jpg) [http://i56.tinypic.com/1ekple.jpg](http://i56.tinypic.com/1ekple.jpg) What am I doing Wrong? Thank you very much, Idan.
Connecting to an SQL server using Java
CC BY-SA 3.0
null
2011-06-16T16:43:05.427
2011-12-22T13:13:28.253
2011-12-22T13:13:28.253
53,195
801,940
[ "java", "sql-server", "driver" ]
6,375,675
1
7,903,118
null
7
27,825
I always end up with the "The ResourceConfig instance does not contain any root resource classes" error I shouldn't even need anything other then jersey-bundle but without it I get errors regarding the asm.jar ``` package akiraapps.jerseytest; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("/hello") public class Hello { // This method is called if TEXT_PLAIN is request @GET @Produces(MediaType.TEXT_PLAIN) public String sayPlainTextHello() { return "Hello Jersey"; } // This method is called if XML is request @GET @Produces(MediaType.TEXT_XML) public String sayXMLHello() { return "<?xml version=\"1.0\"?>" + "<hello> Hello Jersey" + "</hello>"; } // This method is called if HTML is request @GET @Produces(MediaType.TEXT_HTML) public String sayHtmlHello() { return "<html> " + "<title>" + "Hello Jersey" + "</title>" + "<body><h1>" + "Hello Jersey" + "</body></h1>" + "</html> "; } } ``` WEB.XML------ ``` <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <servlet> <servlet-name>Jersey REST Service</servlet-name> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>akiraapps.jerseytest</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Jersey REST Service</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> </web-app> ``` ![classpath](https://i.stack.imgur.com/0X4cv.png) ERROR LOG: > Jun 16, 2011 11:54:03 AM com.sun.jersey.api.core.PackagesResourceConfig init INFO: Scanning for root resource and provider classes in the packages: akiraapps.jerseytest.Hello Jun 16, 2011 11:54:03 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate INFO: Initiating Jersey application, version 'Jersey: 1.7 05/20/2011 11:43 AM' Jun 16, 2011 11:54:03 AM com.sun.jersey.server.impl.application.RootResourceUriRules SEVERE: The ResourceConfig instance does not contain any root resource classes. Jun 16, 2011 11:54:03 AM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes. at com.sun.jersey.server.impl.application.RootResourceUriRules.(RootResourceUriRules.java:99) at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1298) at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:167) at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773) at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:769) at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:769) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:764) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1189) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1103) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:813) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Jun 16, 2011 11:54:03 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Allocate exception for servlet Jersey REST Service com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes. at com.sun.jersey.server.impl.application.RootResourceUriRules.(RootResourceUriRules.java:99) at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1298) at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:167) at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773) at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:769) at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:769) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:764) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1189) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1103) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:813) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
jersey rest issues
CC BY-SA 3.0
0
2011-06-16T16:55:00.257
2017-11-28T14:45:10.957
2017-11-28T14:45:10.957
489,364
530,933
[ "jersey" ]
6,375,822
1
6,385,791
null
1
8,762
Image below displays the result for: ``` div.test { background: #00F; font-size: 50px; line-height: 50px; color: #FFF; margin: 50px 0; font-family: Wiesbaden; } ``` One using `Wiesbaden` (which is font-face) and the other without.`font-face` font seem to ignore the line-height property. ![screenshot](https://i.stack.imgur.com/k4MKP.png) Is it font-face issue or the font?
@font-face and line-height issue
CC BY-SA 3.0
null
2011-06-16T17:07:38.523
2022-12-23T22:01:09.193
null
null
368,691
[ "css", "font-face" ]
6,376,015
1
6,376,926
null
3
1,372
How can I create the floating, translucent, black notifications Xcode 4 and some other apps use to notify users of events? This screenshot shows Xcode's "Build Succeeded" notification as an example. ![enter image description here](https://i.stack.imgur.com/uOpEq.jpg) Thanks in advance.
Creating OSX Notifications Xcode 4 Style
CC BY-SA 3.0
0
2011-06-16T17:25:13.287
2011-06-16T18:43:17.283
null
null
142,137
[ "xcode", "cocoa", "macos", "notifications" ]
6,375,964
1
null
null
2
4,735
I have an ant file which creates an installer. I used launch4j and innosetup. Installer get created. But I got the following error ![This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.](https://i.stack.imgur.com/KLMvC.png) My ant file is: ``` <?xml version="1.0"?> <project basedir="." default="build" name="JavaSamp"> <!--Creation of JavaSampSetup.exe--> <target name="build"> <!-- Creation of classes folder --> <mkdir dir="classes" /> <!-- Compilation of classes --> <javac srcdir="src" destdir="classes" /> <!-- Creation of install/lib --> <mkdir dir="install/lib" /> <!-- Creation of JavaSamp.jar --> <jar destfile="install/lib/JavaSamp.jar" basedir="classes" /> <!-- Copying process of JRE --> <copy todir="install/jre6"> <fileset dir="C:\Program Files\Java\jre6"> <include name="*" /> <include name="bin/**" /> <include name="lib/**" /> <exclude name="lib/charsets.jar" /> <exclude name="lib/ext/sunjce_provider.jar" /> <exclude name="bin/rmid.exe" /> <exclude name="bin/rmiregistry.exe" /> <exclude name="bin/tnameserv.exe" /> <exclude name="bin/keytool.exe" /> <exclude name="bin/kinit.exe" /> <exclude name="bin/klist.exe" /> <exclude name="bin/ktab.exe" /> <exclude name="bin/policytool.exe" /> <exclude name="bin/orbd.exe" /> <exclude name="bin/servertool.exe" /> <exclude name="bin/java.exe" /> <exclude name="bin/javaws.exe" /> <exclude name="bin/javacpl.exe" /> <exclude name="bin/jucheck.exe" /> <exclude name="bin/jusched.exe" /> <exclude name="bin/wsdetect.dll" /> <exclude name="bin/npjava*.dll" /> <exclude name="bin/npoji610.dll" /> <exclude name="bin/regutils.dll" /> <exclude name="bin/axbridge.dll" /> <exclude name="bin/deploy.dll" /> <exclude name="bin/jpicom.dll" /> <exclude name="bin/javacpl.cpl" /> <exclude name="bin/jpiexp.dll" /> <exclude name="bin/jpinscp.dll" /> <exclude name="bin/jpioji.dll" /> <exclude name="bin/jpishare.dll" /> <exclude name="lib/deploy.jar" /> <exclude name="lib/plugin.jar" /> <exclude name="lib/deploy/messages*.properties" /> <exclude name="lib/deploy/splash.jpg" /> </fileset> </copy> <!-- Creation of JavaSamp.exe using Launch4j --> <exec executable="C:\Program Files\Launch4j\launch4jc.exe"> <arg value="${basedir}\installerLaunch4j.xml" /> </exec> <!--Creation of JavaSamp.exe using Inno Setup--> <exec executable="C:\Program Files\Inno Setup 5\ISCC.exe"> <arg value="${basedir}\installerInnoSetup.iss" /> </exec> <echo message="JavaSamp.exe ready" /> </target> </project> ``` And the Launch4j configuration file: ``` <launch4jConfig> <dontWrapJar>true</dontWrapJar> <headerType>gui</headerType> <jar></jar> <outfile>install\JavaSamp.exe</outfile> <errTitle></errTitle> <cmdLine></cmdLine> <chdir>.</chdir> <priority>normal</priority> <downloadUrl>http://java.com/download</downloadUrl> <supportUrl></supportUrl> <customProcName>true</customProcName> <stayAlive>false</stayAlive> <icon></icon> <classPath> <mainClass>JavaSamp</mainClass> <cp>lib/JavaSamp.jar</cp> </classPath> <jre> <path>jre6</path> <minVersion></minVersion> <maxVersion></maxVersion> <dontUsePrivateJres>false</dontUsePrivateJres> <initialHeapSize>0</initialHeapSize> <maxHeapSize>0</maxHeapSize> </jre> <versionInfo> <fileVersion>1.0.0.0</fileVersion> <txtFileVersion>1.0</txtFileVersion> <fileDescription>JavaSamp</fileDescription> <copyright>Copyright (c) 2011 Fsp</copyright> <productVersion>1.0.0.0</productVersion> <txtProductVersion>1.0</txtProductVersion> <productName>JavaSamp</productName> <companyName>Fsp</companyName> <internalName>JavaSamp</internalName> <originalFilename>JavaSamp.exe</originalFilename> </versionInfo> </launch4jConfig> ```
Need help in Launch4j
CC BY-SA 3.0
0
2011-06-16T17:19:45.267
2016-05-16T20:38:49.093
2011-06-17T01:12:35.620
278,899
718,861
[ "java", "launch4j" ]
6,376,202
1
6,376,255
null
0
1,686
What I am trying to do is put few buttons, made from PNG image, that has opaque border and semi transparent other area, over an image that will be controlled (zoomed, panned). Something like that: ![Transparent buttons](https://i.stack.imgur.com/PZ9vI.jpg) What is the best way to achieve this? What layout and what views should be used? Maybe there is similar tutorial to such app design.
How to put semi transparent buttons over an image in layout?
CC BY-SA 3.0
null
2011-06-16T17:40:14.327
2011-06-16T17:44:10.460
null
null
755,640
[ "android", "android-layout", "android-image" ]
6,376,449
1
null
null
0
237
I am trying to link a value that's already in category to the wod entity. Since I do want to call a new record for each record of wod for a category. Not sure how to do this. I was thinking of using predicate but I am not exactly sure how to link it from a fetch request. this is what my schema looks like: ![enter image description here](https://i.stack.imgur.com/YibFA.png) Here's the code that tries to link them together: ``` NSManagedObjectContext *context = [self managedObjectContext]; Wod *wodInfo = [NSEntityDescription insertNewObjectForEntityForName:@"Wods" inManagedObjectContext:context]; [wodInfo setValue:@"Frank" forKey:@"name"]; NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; [request setEntity:[NSEntityDescription entityForName:@"Categories" inManagedObjectContext:context]]; [request setPredicate:[NSPredicate predicateWithFormat:@"(name == %@", @"Time"]]; // This is the part where i am unsure, since i am not exactly sure how to link them up Category *category = reques wodInfo.category = NSError *error; if (![context save:&error]) { NSLog(@"Whoops, couldn't save: %@", [error localizedDescription]); } ``` Any help would be greatly appreciated.
How to link existing values in a 1 to many relationship in core data?
CC BY-SA 3.0
null
2011-06-16T18:01:40.050
2011-06-17T05:32:22.120
null
null
175,027
[ "iphone", "core-data", "nsmanagedobjectcontext", "nsfetchrequest" ]
6,376,439
1
null
null
0
522
I'm using the jquery.idletimeout plugin with the following in my application.js: ``` jQuery.idleTimeout('#session_timeout', '#session_timeout a', { idleAfter: 600, pollingInterval: 15, keepAliveURL: '/session', serverResponseEquals: 'OK', // Additional "on" event functions... }); ``` Here is some relevant Ruby code: ``` # /app/controllers/sessions_controller.rb class SessionsController < ApplicationController respond_to :html, :only => [:new, :create, :destroy] respond_to :js, :only => [:show] # Used by the jQuery.idleTimeout plugin def show if current_user_account # method to check for logged in user render :text => 'OK' else render :text => 'NOT OK', :status => 404 end end end # /config/routes.rb resource :session resources :sessions get 'login' => "sessions#new", :as => "login" get 'logout' => "sessions#destroy", :as => "logout" ``` However, when a page is loaded, my browser's (Chrome) Network console is showing the following (and Firefox's shows an "Aborted" status): ![Screenshot](https://i.stack.imgur.com/qDCuo.png) Requests from the plugin to '/session' are made, but something is messing up. The plugin is seeing these 5 responses as failed and is therefore aborting. To test, I created the following remote link to the same controller/action: ``` <%= link_to 'test remote session', session_path, :remote => true %> ``` If I click this everything seems to work fine. (Last request in screenshot above.) I noticed in my development.log file a difference between the plugin's request and the remote link's request: ``` # Request from plugin: Started GET "/session" for 127.0.0.1 at 2011-06-16 13:31:33 -0400 Processing by SessionsController#show as ... Rendered text template (0.0ms) Completed 200 OK in 898ms (Views: 1.0ms | ActiveRecord: 21.8ms | Sphinx: 0.0ms) # Request from remote link: Started GET "/session" for 127.0.0.1 at 2011-06-16 13:33:36 -0400 Processing by SessionsController#show as JS ... Rendered text template (0.0ms) Completed 200 OK in 918ms (Views: 1.0ms | ActiveRecord: 2.5ms | Sphinx: 0.0ms) ``` The remote link request shows "...#show as " while the plugin's doesn't include the "JS". Not sure if this is part of the problem... Anyway, this is long, but does anyone see what the issue is? Thank you.
Rails 3: jquery.idletimeout plugin's remote requests are failing
CC BY-SA 3.0
null
2011-06-16T18:00:27.227
2011-11-12T00:25:27.277
null
null
538,400
[ "jquery", "ruby-on-rails", "idle-timer" ]
6,376,462
1
6,376,737
null
0
552
My custom view does not display entirely. Please see my screenshot: ![enter image description here](https://i.stack.imgur.com/1xU1f.gif) And the source code ``` package com.dots; import android.graphics.Color; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.os.Bundle; import android.view.View; import android.view.WindowManager; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; public class Dots1Activity extends Activity { private static final String TAG = "DotsActivity"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout ll = new LinearLayout(this); ll.setOrientation(LinearLayout.VERTICAL); LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); CustomDrawableView view1 = new CustomDrawableView(this, 50, 50, Constants.DOTS_RADIUS, Constants.DOTS_COLOR); CustomDrawableView view2 = new CustomDrawableView(this, 150, 150, Constants.DOTS_RADIUS, Constants.DOTS_COLOR); CustomDrawableView view3 = new CustomDrawableView(this, 300, 300, Constants.DOTS_RADIUS, Constants.DOTS_COLOR); ll.addView(view1, layoutParams); ll.addView(view2, layoutParams); ll.addView(view3, layoutParams); setContentView(ll); } } class CustomDrawableView extends View implements View.OnClickListener{ private Context context; private int x, y, radius, color; public CustomDrawableView(Context context, int x, int y, int radius, int color) { super(context); this.context = context; this.x = x; this.y =y; this.radius = radius; this.color = color; setOnClickListener(this); } protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setColor(color); canvas.drawCircle(x, y, radius, paint); } protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){ super.onMeasure(View.MeasureSpec.makeMeasureSpec(Constants.DOTS_RADIUS*2, View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(Constants.DOTS_RADIUS*2, View.MeasureSpec.EXACTLY)); } public void onClick(View v) { Toast.makeText(this.context, x+"-"+y+"-"+radius, Toast.LENGTH_SHORT).show(); } } public interface Constants { public static final int DOTS_RADIUS = 50; public static final int DOTS_COLOR = Color.GREEN; public static final int NUM_DOTS_ROWS = 5; public static final int NUM_DOTS_COLS = 5; public static final int WIDTH_BETWEEN_DOTS = 100; public static final int HEIGHT_BETWEEN_DOTS = 100; } ```
custom View not displayed well in android
CC BY-SA 3.0
null
2011-06-16T18:02:24.987
2011-06-16T18:56:14.840
2011-06-16T18:35:58.663
259,466
796,680
[ "android", "view", "custom-view" ]
6,376,494
1
6,383,482
null
0
11,136
I'm tying to and . But I don't know why isn't it working because I have two date item and they are working fine. When checkbox not selected ![enter image description here](https://i.stack.imgur.com/mJ4OJ.png) When checkbox selected ![enter image description here](https://i.stack.imgur.com/bZjBe.png) > [http://apex.oracle.com/pls/apex/f?p=17236:555](http://apex.oracle.com/pls/apex/f?p=17236:555) Workspace: MACWADU_ORACLE Username: USER Password: 123qweASD If someone wants to help me, can go to the application page 555 or explain here what I have to do. Tanks
Oracle APEX: Hide a button with dynamic actions
CC BY-SA 3.0
0
2011-06-16T18:04:59.927
2016-12-15T06:07:12.530
2016-12-15T06:07:12.530
1,029,088
613,500
[ "oracle-apex" ]
6,376,572
1
6,376,997
null
0
124
I have some divs holidng images I want to display. They are within a centered container. This container has a variable width so depending on your browser size you have either 3 or 4 images in a row before they go flow into the next row. I want to have thoses images centered in the container elment. My problem now is, that this container element is always 100% so but the inside image divs do not fill it. I need the inner divs to expand the out div, so it is only as wide as all the 3 or 4 images and their margin. My html is: ``` <div id='team'> <div class='item-container'> <div class='item'> <img src='small.jpg' alt='' /> </div> </div> <div class='item-container'> <div class='item'> <img src='small.jpg' alt='' /> </div> </div> </div> ``` My css is: ``` #team{ margin: 20px 0px; padding: 20px 0; position: relative; float: left; } #team .item-container{ position: relative; float: left; width: 230px; height: 180px; margin: 2%; } ``` Anyone any ideas? If you do not get what I mean, please ask so I can describe it in more detail. Thanks in advance. ![wireframe](https://i.stack.imgur.com/aYOUJ.png)
Floated parent only extended by content floated divs
CC BY-SA 3.0
null
2011-06-16T18:12:25.320
2012-08-10T07:57:32.270
2012-08-10T07:57:32.270
246,246
197,134
[ "html", "css", "css-float", "parent-child", "center" ]
6,376,586
1
6,376,630
null
10
831
A simple way to represent a graph is with a data structure of the form: ``` {1:[2,3], 2:[1,3], 3:[1,2]} ``` Where the keys in this dictionary are nodes, and the edges are represented by a list of other nodes they are connected to. This data structure could also easily represent a directed graph if the links are not symmetrical: ``` {1:[2], 2:[3], 3:[1]} ``` I don't know much about the graph-theory, so what I'm about to propose might already have a simple solution, but I don't know what to look for. I've encountered what I think is a situation where a graph is somewhat directed, depending on both the node you're at, and the node you came from. To illustrate, I have a drawing: ![Strangely Directional Graph](https://i.stack.imgur.com/ZowbY.jpg) Imagine you're speeding along edge A in a go-kart and at node 1 you hang a left onto edge B. Since you're going so fast, when you hit node 3, you're forced to continue onto edge F. However, if you were coming from edge F, you would be able to go on to either edge E or B. It is clear that node three is connected to 1 and 2, but whether or not you can reach them from that node depends on which direction you came from. I'm wondering if there is a graph theory concept that describes this and/or if there is a simple data structure to describe it. While I'll be writing my code in python, I'll take advice coming from any reasonably applicable language. Edit: I tried to post an image to go along with this, but I'm not sure if it's showing up. If it isn't here's a link to the [image](http://www.image-share.com/ijpg-721-238.html) Edit 2: I should have been clear. The image posted is meant to be a portion of a complete graph, in which there are more nodes off screen from A, D, and F.
How to represent a strange graph in some data structure
CC BY-SA 3.0
0
2011-06-16T18:13:08.830
2011-06-16T21:10:32.547
2011-06-16T18:33:57.417
173,292
173,292
[ "python", "language-agnostic", "data-structures", "graph" ]
6,376,827
1
6,454,454
null
9
5,621
I have layout structure: ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <com.google.ads.AdView android:layout_width="fill_parent" android:layout_height="wrap_content" ads:adSize="BANNER" /> <LinearLayout style="@style/TitleBar" android:layout_width="fill_parent" android:layout_height="45dip" // title bar </LinearLayout> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" // main layout with all needed elements and background!" > </RelativeLayout> </LinearLayout> ``` Everything look fine, until my AdMob disappered. Then I can see empty black region with admob size. UPDATE: my screen shot: ![enter image description here](https://i.stack.imgur.com/WQ9OT.png) normally I cas see here ad block, but when I get onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.) ad disappers and my layout not fill all screen.
Empty space after AdMob disappear
CC BY-SA 3.0
0
2011-06-16T18:32:26.793
2012-10-10T14:05:23.927
2020-06-20T09:12:55.060
-1
467,750
[ "android", "layout" ]
6,376,942
1
6,430,239
null
3
5,633
Here are my styles: Parent container: ``` div.musicContainer { width:820px; height:54px; margin-bottom:20px; } ``` Child containers: ``` div.hardcorePlayer { width:400px; float:left; border:none; background-color:#996600; } div.feedbackPlayer { width:340px; float:right; border:none; background-color:#996600; } ``` The issue is: i installed IE9 yesterday and while IE8 was displaying fine well now the is not lined up to the right boundary any longer. it displays fine in other browsers as before. is this a IE9 bug? IE9 image: ![IE9 image](https://i.stack.imgur.com/C8Yxx.jpg) other browser image: ![else](https://i.stack.imgur.com/auw9a.jpg) thank you very much for your thoughts on this. website url: [www.guygar.com/guygar.html](http://www.guygar.com/guygar.html) NOTE: [new CSS](http://www.guygar.com/css/siteCssTemp.css) Have i done something wrong?
IE9 CSS float:right Bug?
CC BY-SA 3.0
null
2011-06-16T18:44:20.157
2011-06-28T14:08:17.110
2011-06-22T15:10:07.713
324,249
324,249
[ "css", "html", "internet-explorer-9" ]
6,376,948
1
6,377,099
null
4
7,685
I'm trying to download and extract a zip file in C#, specifically DotNetZip. When I run this code... ``` HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(reportUrl); HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse(); Stream stream = response.GetResponseStream(); MemoryStream ms = new MemoryStream(); stream.CopyTo(ms); ms.Seek(0, 0); ZipInputStream zip = new ZipInputStream(ms); zip.Seek(0, 0); ZipEntry e = zip.GetNextEntry(); string s = e.FileName; MemoryStream ms2 = new MemoryStream(); e.Extract(ms2); ``` After the Extract method executes, I get... ``` $exception {"Object reference not set to an instance of an object."} System.Exception {System.NullReferenceException} ``` Any thoughts? Thanks! ![Here's what the object looks like before the method runs](https://i.stack.imgur.com/LgcmO.png)
Extracting zip file in memory failing with C# DotNetZip
CC BY-SA 3.0
0
2011-06-16T18:44:38.533
2011-06-16T19:01:00.507
2011-06-16T19:01:00.507
573,180
573,180
[ "c#", "zip", "dotnetzip" ]
6,377,054
1
6,377,244
null
1
2,689
![img space](https://content.screencast.com/users/brizna/folders/Jing/media/f73f0b6e-606e-45a9-8ade-1f6dde7b8e56/img%20spacing.png) This question involves the black box from the picture (it is a `<th>` tag). The `<th>` tag ends up with a height of 23px. The images are 18px by 18px. Where's the 5px bottom margin coming from and how to I get rid of it? borders, padding, and margins are all set to 0. manually setting the height of the `<tr>` and the `<th>` tag to 18px doesn't do anything. Anything below 23px has no effect. Help!
white space around an img tag within a th
CC BY-SA 3.0
null
2011-06-16T18:54:05.410
2012-01-04T20:00:18.090
2017-02-08T14:32:29.227
-1
618,964
[ "html", "css" ]
6,377,473
1
6,378,281
null
1
243
I have a particular goal in mind here, searching for it is a little hard. I am trying to accomplish this (This is a photoshopped screenshot): ![enter image description here](https://i.stack.imgur.com/26tUN.jpg) I have everything in this view working, except for the split row for the Company Name/ Beginning of the field row. The "Company Name" field is just a textfield, all I really want to do is shrink that neato cell background to just go behind the right side.
Kind of complicated custom UITableViewCell
CC BY-SA 3.0
null
2011-06-16T19:30:45.960
2011-06-16T20:37:24.207
null
null
650,233
[ "ios", "uitableview" ]
6,377,493
1
6,377,681
null
11
13,796
I have set up some gesture recognition in an app that I'm building. One of the gestures is a single finger single tap, which hides the toolbar at the top of the screen. Works great except for one thing: a tap on a link causes the toolbar to go away, too. Is it possible to detect a tap that was not a tap on a link? Could I do this by seeing where the tap occurred, and only take action if it didn't occur on an html link? Is this is possible, a pointer to how to determine if a link was tapped would be helpful. Per Octys suggestion, I did attempt to wrap the UIWebView inside a UIView. I'm using interface builder, so I inserted a view in the hierarchy, and made the UIWebView a "child" of the new UIView. The hierarchy looks like this now: ![Hierarchy screen shot](https://i.stack.imgur.com/gN9Bg.png) I added an IBOutlet for the view in my view controller, and linked it up in interface builder. I changed the gesture recognizer setup to look like this: ``` UITapGestureRecognizer* singleTap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleSingleTap:)]; singleTap.numberOfTouchesRequired=1; singleTap.delegate=self; [self.UIWebViewContainer addGestureRecognizer:singleTap]; [singleTap release]; ``` This code resides in viewDidLoad. As before, the code correctly sees a single finger single tap, but a tap on a link in the UIWebView also causes the toolbar to go away. I only want the toolbar to go away if a link was NOT tapped. Anyone have any suggestions? Thank you. Chris Thanks Chris
Gesture recognition with UIWebView
CC BY-SA 3.0
0
2011-06-16T19:32:40.977
2013-08-24T09:24:10.490
2011-06-17T17:13:50.913
578,847
578,847
[ "ios", "cocoa-touch", "uiwebview", "uigesturerecognizer" ]
6,377,621
1
6,398,819
null
0
236
I have the .java, .class, .cpp, .h files: [http://www.ibm.com/developerworks/java/tutorials/j-jni/section2.html](http://www.ibm.com/developerworks/java/tutorials/j-jni/section2.html) After reading TotalFrickinRockstarFromMars's comment, I setting up classpath. What's wrong? ![lala](https://i.stack.imgur.com/Zv4Vb.png) Sample1.dll IS there. Text version: F:\workspace\JavaJNIProj\src>java Sample1 ``` Exception in thread "main" java.lang.UnsatisfiedLinkError: F:\workspace\JavaJNIProj\src\Sample1.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at Sample1.main(Sample1.java:10) ```
Java JNI trouble
CC BY-SA 3.0
null
2011-06-16T19:42:57.763
2011-06-18T20:47:02.657
2011-06-17T05:28:08.467
688,843
688,843
[ "java", "path", "java-native-interface" ]
6,377,809
1
6,721,576
null
2
2,310
I'm trying to create a [Mono](http://en.wikipedia.org/wiki/Mono_%28software%29)-for-Android application in [MonoDevelop](http://en.wikipedia.org/wiki/MonoDevelop). I'm on Windows 7 64-bit, and my MonoDevelop version is 2.6 Beta 3. When I enter an application name and hit the forward button, it gives me the following errors, 1. File Activity1.cs could not be written. 2. File Resources could not be written. 3. File Properties could not be written. 4. File Assets could not be written. What's the problem? ### Error details for error 1 ``` System.MissingMethodException: Method not found: 'MonoDevelop.Projects.ProjectFile MonoDevelop.Projects.ProjectFileEventArgs.get_ProjectFile()'. at MonoDevelop.MonoDroid.MonoDroidProject.OnFileAddedToProject(ProjectFileEventArgs e) at MonoDevelop.Projects.Project.NotifyFileAddedToProject(IEnumerable`1 objs) at MonoDevelop.Projects.Project.OnItemsAdded(IEnumerable`1 objs) at MonoDevelop.Projects.DotNetProject.OnItemsAdded(IEnumerable`1 objs) at MonoDevelop.Projects.ProjectItemCollection`1.NotifyAdded(IEnumerable`1 items, Boolean comesFromParent) at MonoDevelop.Projects.ProjectItemCollection`1.MonoDevelop.Projects.IItemListHandler.InternalAdd(IEnumerable`1 objs, Boolean comesFromParent) at MonoDevelop.Projects.ProjectItemCollection`1.NotifyAdded(IEnumerable`1 items, Boolean comesFromParent) at MonoDevelop.Projects.ProjectItemCollection`1.OnItemAdded(T item) at MonoDevelop.Projects.ItemCollection`1.InsertItem(Int32 index, T item) at System.Collections.ObjectModel.Collection`1.Add(T item) at MonoDevelop.Projects.Project.AddFile(String filename, String buildAction) at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.AddFileToProject(SolutionItem policyParent, Project project, String language, String directory, String name) at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.AddToProject(SolutionItem policyParent, Project project, String language, String directory, String name) at MonoDevelop.Ide.Templates.ProjectDescriptor.InitializeItem(SolutionItem policyParent, ProjectCreateInformation projectCreateInformation, String defaultLanguage, SolutionEntityItem item) ``` Get similar details for other errors. This is what I get when I install the AddIn: ![Enter image description here](https://i.stack.imgur.com/X4vXU.png) Also when I hit Tools>Options>Other>Mono for Android SDK's, I get the following error(and error details) in a pop-up > Un-handled exception ``` System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified. at MonoDevelop.MonoDroid.Gui.MonoDroidSdkSettingsWidget.Build() at MonoDevelop.MonoDroid.Gui.MonoDroidSdkSettingsWidget..ctor() at MonoDevelop.MonoDroid.Gui.MonoDroidSdkSettings.CreatePanelWidget() at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.CreatePageWidget(SectionPage page) at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.ShowPage(OptionsDialogSection section) at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.OnSelectionChanged(Object s, EventArgs a) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args) at GLib.SignalClosure.Invoke(ClosureInvokedArgs args) at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) ```
Creating a MonoDevelop application
CC BY-SA 3.0
null
2011-06-16T19:57:02.053
2014-08-11T21:15:28.823
2020-06-20T09:12:55.060
-1
330,697
[ "android", "monodevelop", "xamarin.android" ]
6,377,934
1
6,398,260
null
3
4,072
I'm trying to draw the following shape using OpenGL ES 1.1. And well, I'm stuck, I don't really know how to go about it. My game currently uses Android's Canvas API, which isn't hardware accelerated, so I'm rewriting it with OpenGL ES. The Canvas class has a method called drawArc which makes drawing this shape very very easy; [Canvas.drawArc](http://developer.android.com/reference/android/graphics/Canvas.html#drawArc%28android.graphics.RectF,%20float,%20float,%20boolean,%20android.graphics.Paint%29) Any advice/hints on doing the same with OpenGL ES? ![enter image description here](https://i.stack.imgur.com/K1ccy.png) Thank you for reading.
Drawing a circle with a sector cut out in OpenGL ES 1.1
CC BY-SA 3.0
0
2011-06-16T20:06:41.473
2011-10-05T07:27:41.140
2011-06-16T20:23:00.420
563,718
563,718
[ "opengl-es" ]
6,377,961
1
null
null
5
8,005
> [How do i rotate a window in xCode 4 interface builder tool thing?](https://stackoverflow.com/questions/5327927/how-do-i-rotate-a-window-in-xcode-4-interface-builder-tool-thing) Is it possible to rotate : ![enter image description here](https://i.stack.imgur.com/ajjlH.png) to landscape mode. I want my application to just support landscape mode therefore it will be easier if I could work on landscape mode with Xcode. I know how to rotate the view on the iPhone and iPad simulator but I actually want to rotate it in Xcode.
Rotate view in xib file to landscape mode
CC BY-SA 3.0
null
2011-06-16T20:08:42.007
2011-06-16T20:12:12.973
2017-05-23T12:09:28.720
-1
637,142
[ "iphone", "xcode", "ios4", "xcode4", "landscape" ]
6,378,136
1
6,389,510
null
0
221
It does work on some machine's but wold not start on other computers. from the code line's I see the problem is related to devex components. this is the message I get: ![Error](https://i.stack.imgur.com/d3rRU.png)
Devex Ribbon control prevents applicetion start - entry point was not found
CC BY-SA 3.0
null
2011-06-16T20:23:03.297
2011-06-17T17:31:35.433
2011-06-17T15:13:47.140
675,516
675,516
[ "vb.net", ".net-4.0", "devexpress" ]
6,378,440
1
6,378,485
null
0
381
I'm using Ruby on Rails 3.0.8. I'm trying to follow the tutorial by Ryan Bates [found here.](http://railscasts.com/episodes/260-messaging-with-faye) Here is all of my code, then I'll explain what it's doing: ``` <ul id="chat"> <%= render @messages %> </ul> <br/> <%= form_for Message.new, :remote => true do |f| %> <%= f.text_field :content %> <%= f.submit "Send" %> <% end %> ``` (I'm using content tags vs. pure html) ``` <%= content_tag :li do %> <%= content_tag :span, :class => "created_at" do %> <%= message.created_at.strftime("%H:%M") %> <% end %> <%= message.content %> <% end %> ``` ``` <% broadcast "/messages/new" do %> $("#chat").append("<%= escape_javascript render(@message) %>"); <% end %> $("#new_message")[0].reset(); ``` I think that's all of the relevant code. My problem is that when I click 'Send', it's adding the pure html to my 'chat'. But if I refresh the page, that html is no longer there until I submit a new message. ![enter image description here](https://i.stack.imgur.com/sNlDv.png) Just from looking at this, it looks like the html is completely incorrect, the ending tag for span and li aren't right. Why would this be happening? But when I refresh, it looks pretty much fine. ![enter image description here](https://i.stack.imgur.com/7i25H.png) Thanks everyone in advance!
Not appending the actual HTML in Rails
CC BY-SA 3.0
null
2011-06-16T20:51:38.940
2011-06-16T20:55:47.503
null
null
214,812
[ "javascript", "html", "ruby-on-rails", "faye", "content-tag" ]
6,378,505
1
null
null
1
5,072
I'm just starting to learn HTML and ASP.NET I have problem with aligning content in a table. Here is my code: ``` .cartonTb { font-size:x-large; text-align:right; } .cartonlnkBtn { text-align:left; font-size:x-large; } <table > <tr> <td> <table width="800"> <tr> <td > <asp:Label runat="server" Text="MODEL NO" class="cartonlnkBtn" /> </td> <td > <asp:TextBox ID="tbCartonModel" runat="server" class="cartonTb" style="width:200px" /> </td> <td > <asp:Label runat="server" Text="MODEL VERSION" class="cartonlnkBtn" /> </td> <td > <asp:TextBox ID="tbCartonModelVer" runat="server" class="cartonTb" style="width:100px"/> </td> </tr> </table> </td> </tr> <tr> <td> <table width="800"> <tr> <td > <asp:Label runat="server" Text="PART NO" class="cartonlnkBtn" /> </td> <td > <asp:TextBox ID="tbCartonPartNp" runat="server" class="cartonTb" style="width:200px" /> </td> <td > <asp:Label runat="server" Text="QUANTITY" class="cartonlnkBtn" /> </td> <td> <asp:TextBox ID="tbCartonQty" runat="server" class="cartonTb" style="width:100px" /> </td> </tr> </table> </td> </tr> </table> ``` Output in browser look like this: ![enter image description here](https://i.stack.imgur.com/3jELv.jpg) I would like have a same start position for labels and texboxes. I would like achive this look: ![enter image description here](https://i.stack.imgur.com/U8z1n.png)
Aligning content in an HTML table
CC BY-SA 3.0
null
2011-06-16T20:57:22.293
2017-07-30T21:30:48.107
2017-07-30T21:30:48.107
4,370,109
null
[ "html", "asp.net", "html-table", "alignment" ]
6,378,543
1
null
null
1
5,612
I would like to add a smaller image on top of a larger image (eventually for PiP on a video feed). I can do it by iterating through the relevant data property in the large image and add the pixels from the small image. But is there a simpler and neater way? I'm using EMGU. My idea was to define an ROI in the large image of the same size as the small image. Set the Large image equal to the small image and then simply remove the ROI. Ie in pseudo code: ``` Large.ROI = rectangle defined by small image; Large = Small; Large.ROI = Rectangle.Empty; ``` However this doesn't work and the large image doesn't change. Any suggestions would be much appreciated. Large image: ![Large Image](https://i.stack.imgur.com/NbI7o.png) Small image: ![Small Image](https://i.stack.imgur.com/PLKUI.png) Desired result: ![Desired Result](https://i.stack.imgur.com/hdKi4.png)
Is Picture-in-Picture possible using OpenCV?
CC BY-SA 3.0
0
2011-06-16T21:01:07.313
2019-12-16T14:05:36.970
2019-12-16T14:05:36.970
11,138,259
802,283
[ "opencv", "emgucv", "roi" ]
6,378,682
1
6,380,432
null
0
2,535
In the Flash IDE, I have made a dynamic text field bold. When the Flash is compiled and run, the bold styling disappears. How do I retain the bold styling? : IDE : SWF ![flash dynamic text](https://i.stack.imgur.com/Q4Msq.png)
Dynamic text lost its bold styling
CC BY-SA 3.0
null
2011-06-16T21:13:05.667
2011-06-17T01:18:38.810
null
null
459,987
[ "flash" ]
6,378,720
1
null
null
1
1,647
I have a .net / c# command line application that takes a couple parameters in the format like: some.exe -p1: -p2: etc A complete sample call looks like this: Now for some reason the -ci:"d:...." part breaks the string[] args up weirdly, see with the -ci: one: ![full command line including the -ci: part](https://i.stack.imgur.com/Ry2Yb.png) vs without: ![command line without the -ci: part](https://i.stack.imgur.com/1QL5O.png) Everything past the -ci: part gets messed up.. for some reason & I am wondering what it is? Any ideas?
.Net Command Line args problems
CC BY-SA 3.0
0
2011-06-16T21:16:27.217
2011-06-16T21:33:23.690
2011-06-16T21:18:52.627
21,461
2,591
[ "c#", ".net", "command-line", "command-line-arguments" ]
6,378,801
1
6,379,771
null
1
814
I am using : Visual studio 2010 Professional Edition and developing Excel addin 2007 Where could i find the options I have there? Or could you tell me which edition of vs has the button? Print screen ![enter image description here](https://i.stack.imgur.com/yfIqG.png) Thank you!
I do not have Application Files dialog box in my vs2010
CC BY-SA 3.0
0
2011-06-16T21:24:00.463
2011-06-16T23:24:14.137
2011-06-16T23:09:09.383
520,535
520,535
[ "c#", "visual-studio-2010", "clickonce" ]
6,378,803
1
6,380,610
null
0
553
I'm wondering an inline edit Textfield for Swing does exist. I googled around a bit and checked all swing libraries which I know, but i did not find such a component. Has anyone implemented such a edit-in-place swing component or does someone know such a project? I know [this SO Thread](https://stackoverflow.com/questions/5941746/edit-in-place-swing-components). but I do not want the "spreadsheet feeling". --- Edit Because I was not clear what I mean with edit-in-place component: Essentially the component should look like a Label, but when I click on the Label, it is replaced with a Textfield. Of course this would be trivial to implement with JLabel and JTextfield, but I want a more sophisticated solution. Here a screenshot from a Javascript when hovering the editable field: ![Editable Screen](https://i.stack.imgur.com/Qz0Dk.png) And here when clicking on it: ![Editable Screen2](https://i.stack.imgur.com/qTMEG.png) Of course I do not want the picklist here, but this is just for visualization. I hope you get the idea :)
Inline edit component in Swing
CC BY-SA 3.0
null
2011-06-16T21:24:32.113
2011-06-17T01:52:22.817
2017-05-23T10:30:21.840
-1
441,467
[ "java", "swing", "components", "edit-in-place" ]
6,378,942
1
null
null
7
1,400
How can I publish a regression formula nicely? ``` fit1<-dynlm(dep~indep1+indep2+indep3) s1<-summary(fit1) s1$call ``` How can I Sweave `s1$call` ? I mean I do not want to have somethin like `dynlm(formula=dep~indep1+indep2+indep3)´ in my pdf document. I´d prefer to have a more textbook style over this function call style. Plus I´d like to (manually?) add intercept and errorterm to the model (because it's actually in there). Note that I found `outreg` on google (which seems a little bit too heavyweighted right now) and not exactly fitting my needs at first sight. EDIT: Trying to post sample output, actually I´d love to, but I don't know how to do it better with the SO editor: ``` dep = alpha + beta_1*indep1 + beta_2*indep2 + beta_3*indep3 + epsilon ``` Some matrix notation would also be fine, but printing the model definition would be nice no matter how. Of course adding it manually is also possible, but when you are in a robustness check phase the model variables might change often and the documentation has got to be up to date. (Using [http://texify.com](http://texify.com) :) ![img]http://www.texify.com/img/%5CLARGE%5C%21%5Cmbox%7Bdep%7D%20%3D%20%5Calpha%20%2B%20%5Cbeta_1%20%5Ccdot%20%5Cmbox%7Bindep1%7D%20%2B%20%5Cbeta_2%20%5Ccdot%20%5Cmbox%7Bindep2%7D%20%2B%20%5Cepsilon.gif[/img](https://i.stack.imgur.com/gRu6z.gif)
How to publish (sweave) regression formulas?
CC BY-SA 3.0
0
2011-06-16T21:35:44.393
2016-05-06T15:16:44.470
2011-06-18T00:24:04.757
190,277
366,256
[ "r", "publish", "regression", "sweave" ]
6,379,255
1
6,379,682
null
9
5,302
I am a Swing novice using NetBeans. I want to vertically scroll two side-by-side JTextPane's. The scrolling should be syncronized and done through a single scrollbar. If I add JTextPanes from the NetBean designer they are automatically put inside a JScrollPane so they scroll independently. I have deleted the enclosing scroll panes and put them in a JPanel instead so the JPanel can be the client of a single JScrollPane. This seems to work except that when the JTextPanes are very long they seem to go beyong the end of the JPanel. I can scroll the panel and both text panes to a certain point. When I reach the bottom I can put a cusor in one of the text panes and arrow down beyond my field of view. Here is code from my main method. I have copied the layout from something that was generated by the NetBeans designer. ``` java.awt.EventQueue.invokeLater(new Runnable() { public void run() { topFrame aTopFrame = new topFrame(); JScrollPane scollBothDiffs = new javax.swing.JScrollPane(); JPanel bothDiffsPanel = new javax.swing.JPanel(); JTextPane leftDiffPane = diffPane1; JTextPane rightDiffPane = diffPane2; javax.swing.GroupLayout bothDiffsPanelLayout = new javax.swing.GroupLayout(bothDiffsPanel); bothDiffsPanel.setLayout(bothDiffsPanelLayout); bothDiffsPanelLayout.setHorizontalGroup( bothDiffsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(bothDiffsPanelLayout.createSequentialGroup() .addGap(20, 20, 20) .addComponent(leftDiffPane, javax.swing.GroupLayout.PREFERRED_SIZE, 463, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(rightDiffPane, javax.swing.GroupLayout.PREFERRED_SIZE, 463, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(52, Short.MAX_VALUE)) ); bothDiffsPanelLayout.setVerticalGroup( bothDiffsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, bothDiffsPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(bothDiffsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(rightDiffPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 630, Short.MAX_VALUE) .addComponent(leftDiffPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 630, Short.MAX_VALUE)) .addContainerGap()) ); scollBothDiffs.setViewportView(bothDiffsPanel); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(aTopFrame.getContentPane()); aTopFrame.getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(20, 20, 20) .addComponent(scollBothDiffs, javax.swing.GroupLayout.DEFAULT_SIZE, 997, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(scollBothDiffs, javax.swing.GroupLayout.DEFAULT_SIZE, 671, Short.MAX_VALUE) .addContainerGap()) ); aTopFrame.pack(); aTopFrame.setVisible(true); } }); ``` Here is an image that shows my implementation of the first answer where the text panes are not limited to the horizontal display area. ![Image showing text panes that are too wide for the horizontal display area](https://i.stack.imgur.com/anncN.jpg) And this image shows the text panes limited in the horizontal display area but this example has the original issue of not scrolling vertically if the text panes are very long. ![Image showing text panes that are bounded horizontally](https://i.stack.imgur.com/2rDB8.jpg)
How to scroll two JTextPane's?
CC BY-SA 3.0
0
2011-06-16T22:13:00.123
2011-06-17T02:41:57.387
2011-06-17T02:41:57.387
802,349
802,349
[ "java", "swing", "scroll" ]
6,379,784
1
6,380,414
null
2
267
I'd like to get a census on methods of removing/adding records via AJAX and updating the front-end. For tabular data (take an inbox for example): ![enter image description here](https://i.stack.imgur.com/xuL3i.gif) When I want to remove that first message, where/how should I be referencing the ID of that message and sending it to my AJAX call? I've seen some people put the ID in a hidden field, or use the checkbox id attribute... How is this transaction properly handled so that when my call is successful, I can "remove" that row with jQuery?
Server-side and AJAX and data manipulation
CC BY-SA 3.0
null
2011-06-16T23:26:41.683
2011-06-17T01:16:30.057
2011-06-17T00:05:14.347
337,806
337,806
[ "ajax", "jquery", "coldfusion", "frontend" ]
6,379,937
1
6,386,255
null
16
1,926
I'm trying to learn how to make a compiler. In order to do so, I read a lot about context-free language. But there are some things I cannot get by myself yet. Since it's my first compiler there are some practices that I'm not aware of. My questions are asked with in mind to build a parser generator, not a compiler neither a lexer. Some questions may be obvious.. Among my reads are : [Bottom-Up Parsing](http://dragonbook.stanford.edu/lecture-notes/Stanford-CS143/08-Bottom-Up-Parsing.pdf), [Top-Down Parsing](http://dragonbook.stanford.edu/lecture-notes/Stanford-CS143/07-Top-Down-Parsing.pdf), [Formal Grammars](http://dragonbook.stanford.edu/lecture-notes/Stanford-CS143/06-Formal-Grammars.pdf). The picture shown comes from : [Miscellanous Parsing](http://dragonbook.stanford.edu/lecture-notes/Stanford-CS143/12-Miscellaneous-Parsing.pdf). All coming from the Stanford CS143 class. ![Parsers / Grammars Hierarchy](https://i.stack.imgur.com/VUQhu.png) Here are the points : 0) How do ( ambiguous / unambiguous ) and ( left-recursive / right-recursive ) influence the needs for one algorithm or another ? Are there other ways to qualify a grammar ? 1) An ambiguous grammar is one that have several parse trees. But shouldn't the choice of a leftmost-derivation or rightmost-derivation lead to unicity of the parse tree ? [EDIT: Answered [here](https://stackoverflow.com/questions/243383/why-c-cannot-be-parsed-with-a-lr1-parser/1004737#1004737) ] 2.1) But still, is the ambiguity of the grammar related to k ? I mean giving a LR(2) grammar, is it ambiguous for a LR(1) parser and not ambiguous for a LR(2) one ? [EDIT: No it's not, a LR(2) grammar means that the parser will need two tokens of lookahead to choose the right rule to use. On the other hand, an ambiguous grammar is one that possibly leads to several parse trees. ] 2.2) So a LR(*) parser, as long as you can imagine it, will have no ambiguous grammar at all and can then parse the entire set of context free languages ? [EDIT: Answered by Ira Baxter, LR(*) is less powerful than GLR, in that it can't handle multiple parse trees. ] 3) Depending on the previous answers, what follows may be self contradictory. Considering LR parsing, do ambiguous grammars trigger shift-reduce conflict ? Can an unambiguous grammar trigger one too ? In the same way, what about reduce-reduce conflicts ? [EDIT: this is it, ambiguous grammars leads to shift-reduce and reduce-reduce conflicts. By contrapositive, if there are no conflicts, the grammar is univocal. ] 4) The ability to parse left-recursive grammar is an advantage of LR(k) parser over LL(k), is it the only difference between them ? [EDIT: yes. ] 5) Giving G1 : ``` G1 : S -> S + S S -> S - S S -> a ``` 5.1) G1 is both left-recursive, right-recursive, and ambiguous, am I right ? Is it a LR(2) grammar ? One would make it unambiguous : ``` G2 : S -> S + a S -> S - a S -> a ``` 5.2) Is G2 still ambiguous ? Does a parser for G2 needs two lookaheads ? By factorisation we have : ``` G3 : S -> S V V -> + a V -> - a S -> a ``` 5.3) Now, does a parser for G3 need one lookahead only ? What are the counter parts for doing these transformations ? Is LR(1) the minimal parser required ? 5.4) G1 is left recursive, in order to parse it with a LL parser, one need to transform it into a right recursive grammar : ``` G4 : S -> a + S S -> a - S S -> a ``` then ``` G5 : S -> a V V -> - V V -> + V V -> a ``` 5.5) Does G4 need at least a LL(2) parser ? G5 only is parsable by a LL(1) parser, G1-G5 do define the same language, and this language is ( a (+/- a)^n ). Is it true ? 5.6) For each grammar G1 to G5, what is the minimal set to which it belongs ? 6) Finally, since many differents grammars may define the same language, how does one chose the grammar and the associated parser ? Is the resulting parse tree imortant ? What is the influence of the parse tree ? I'm asking a lot, and I don't really expect a complete answer, anyway any help would be very appreciated. Thx for reading !
What about theses grammars and the minimal parser to recognize it?
CC BY-SA 3.0
0
2011-06-16T23:51:47.850
2012-09-04T14:35:42.853
2017-05-23T12:30:24.823
-1
341,603
[ "parsing", "grammar", "context-free-grammar" ]
6,380,046
1
6,380,058
null
1
107
Guys Please help me to solve this floating problem.I tried different methods but anything didn't work for me.![enter image description here](https://i.stack.imgur.com/Z21Jh.jpg) In the html file,Small images are in the global container.Footer placed right below the global container.But now the footer comes to the top. These are my css- CSS of images- ``` style="margin-top: 25px; margin-right: 48px; float: right;"<br> style="margin-top: 25px; margin-right: 48px; float: left;" #footer_container{ width: 900px; height: 10px; margin-top: 10px; padding-bottom: 10px; position: absolute; border: solid; } #global_body_container{ width: 746px; position: absolute; padding-bottom: 10px; border-color: #c6c8cc; border-style:dashed; clear: both; } ``` Thank you.
CSS float help needed
CC BY-SA 3.0
null
2011-06-17T00:10:34.097
2012-05-11T16:21:52.933
2012-05-11T16:21:52.933
44,390
786,680
[ "html", "css", "css-float" ]
6,380,235
1
6,380,353
null
11
5,906
So I'm having a bit of trouble getting rid of the entire margin of a graphics device. I've set mar to 0, but there is still some persistent space around the edge. For example: ``` plot.new() par(mar=c(0,0,0,0)) plot.window(c(0,1),c(0,1)) points(c(1,1,0,0),c(1,0,1,0)) ``` ![enter image description here](https://i.stack.imgur.com/cuGrX.png) I would like the points to be centered at the extreme edges of the plot. Is there a `par` that I am missing?
Removing all margins in an R graphics device
CC BY-SA 3.0
0
2011-06-17T00:43:23.823
2013-01-24T22:30:22.117
2011-08-04T16:25:41.860
355,270
160,314
[ "r" ]
6,380,478
1
6,386,490
null
1
5,053
I have problem where google chrome is showing: `The site uses SSL, but Google Chrome has detected either high-risk insecure content on the page or problems with the site’s certificate. Don’t enter sensitive information on this page. Invalid certificate or other serious https issues could indicate that someone is attempting to tamper with your connection to the site.` message which shows up as crossed with red https sign. ### How should I configure tomcat to get rid of the message shown in detail on the below picture? I found this link but can't make out from it how to fix this: [http://code.google.com/p/chromium/issues/detail?id=72716](http://code.google.com/p/chromium/issues/detail?id=72716) Also there is mention of OpenSSL problem with APR (what would be the OpenSSL alternative?): [http://tomcat.apache.org/security-native.html](http://tomcat.apache.org/security-native.html) I have GeoTrust Business ID certificate which is more than adequate for the site and should be secure enough. So I believe this some issue with either Tomcat or Java. Working configuration in server.xml: ``` <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxHttpHeaderSize="16384" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css" scheme="https" secure="true" SSLEnabled="true" sslProtocol="TLS" clientAuth="false" keystoreFile="/usr/share/tomcat6/conf/tomcat.keystore" keystorePass="somepass" /> ``` is giving me the error on the picture: ![enter image description here](https://i.stack.imgur.com/twa2h.jpg) --- # UPDATE - Going native ``` `<Connector port="443"` protocol="org.apache.coyote.http11.Http11AprProtocol" maxHttpHeaderSize="16384" maxThreads="150" enableLookups="false" acceptCount="100" disableUploadTimeout="true" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css" scheme="https" secure="true" SSLEnabled="true" SSLCertificateFile="/tomcat/conf/cert.crt" SSLCertificateKeyFile="/tomcat/conf/key.pem" SSLCACertificateFile="/tomcat/conf/rootandintermidiate.crt" clientAuth="optional" /> ``` This seemed to do the trick!
Tomcat 6 SSL configuration - in Chrome error saying that renegotiation is disabled!
CC BY-SA 3.0
0
2011-06-17T01:27:34.917
2011-06-17T17:37:51.627
2020-06-20T09:12:55.060
-1
465,179
[ "java", "tomcat", "google-chrome", "configuration", "ssl" ]
6,380,683
1
6,380,745
null
0
185
i am designing a project in asp.net mvc3. this is my table ![enter image description here](https://i.stack.imgur.com/MnwbJ.png) i want to print all information where RawMaterialID=1 please suggest me how should i write query to do this. I am using Entity Framework to access database.
How can write query to select all information where RawMaterialID=1
CC BY-SA 3.0
null
2011-06-17T02:06:51.983
2011-06-17T02:20:17.333
2011-06-17T02:08:35.633
273,200
887,872
[ "sql", "asp.net-mvc", "asp.net-mvc-2", "asp.net-mvc-3" ]
6,380,908
1
null
null
1
2,397
![+ - × /](https://i.stack.imgur.com/5jA3b.png) I'm having a really weird problem while following the Gestures tutorial here: [http://developer.android.com/resources/articles/gestures.html](http://developer.android.com/resources/articles/gestures.html). 4 unique gestures are created in Gesture Builder: + - × / Add and multiply are multi-stroke. Subtract and divide are single stroke. The Activity loads the pre-built GestureLibrary (R.raw.gestures), adds an OnGesturePerformedListener to the GestureOverlayView, and ends with onGesturePerformed() when a gesture is detected & performed. ``` <android.gesture.GestureOverlayView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gestures" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gestureStrokeType="multiple" android:eventsInterceptionEnabled="true" android:orientation="vertical" /> ``` ``` mLibrary = GestureLibraries.fromRawResource(this, R.raw.gestures); if (!mLibrary.load()) { finish(); } GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures); gestures.addOnGesturePerformedListener(this); ``` ``` ArrayList<Prediction> predictions = mLibrary.recognize(gesture); // We want at least one prediction if (predictions.size() > 0) { Prediction prediction = predictions.get(0); // We want at least some confidence in the result if (prediction.score > 1.0) { // Show the spell Toast.makeText(this, prediction.name, Toast.LENGTH_SHORT).show(); } } ``` The main problem is the pre-built gestures are not being recognized correctly. For example, onGesturePerformed() is never performed if a horizontal gesture is followed by a vertical (addition). The method called if a vertical gesture is followed by a horizontal. This is how GesturesListDemo behaves too ([GesturesDemos.zip @ code.google.com](http://code.google.com/p/apps-for-android/downloads/detail?name=GesturesDemos.zip&can=2&q=)). Furthermore, the predicted gesture ends up being the incorrect gesture. Add is recognized as subtract; multiply as divide; Subtract as add. It's completely inconsistent. Finally, add and subtract gestures typically share similar Prediction.score's, which is weird since they differ by an entire stroke. Sorry about the long post -- wanted to be thorough. Any advice would be greatly appreciated, thanks all.
Android Gestures, Single stroke & Multi-stroke produce inconsistent results
CC BY-SA 3.0
null
2011-06-17T03:00:56.187
2014-11-25T23:50:16.740
2011-06-17T06:26:33.190
264,734
264,734
[ "java", "android", "xml", "gestures" ]
6,381,115
1
6,381,472
null
0
825
I have created a new module in Orchard CMS, i have a new event part that has a whole bunch of custom fields. How do i change the heading displayed in the list of content? Thanks ![Orchard CMS Content List](https://i.stack.imgur.com/qQKNc.png)
Using Orchard CMS how do I change the heading displayed in the list of content items
CC BY-SA 3.0
null
2011-06-17T03:45:09.813
2014-08-18T08:02:04.047
null
null
38,686
[ "orchardcms" ]
6,381,378
1
6,381,522
null
6
1,167
I have two entities: patient and checkpoint. Patient has attributes such as DOB, name, ID, etc. Checkpoint has attributes such as dateRecorded, height, weight, etc. You probably get the idea- I want there to be a set of patients, and then each patient can have checkpoints associated with that patient. On both entities, how should I set the settings? The settings are: ![Relationship Window](https://i.stack.imgur.com/xxtQ5.png) I looked at the [documentation](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdRelationships.html) for this, and I was still confused. I think what I want is a one to many relationship (for patient), but then I'm not sure how to set the inverses for either of them, or the delete rule and the other stuff. THANK YOU!!
Modeling a one-to-many relationship in Core Data for iOS
CC BY-SA 3.0
0
2011-06-17T04:36:13.440
2013-02-22T21:53:38.367
2013-02-22T21:53:38.367
1,971,315
706,760
[ "ios", "core-data", "entity-relationship", "one-to-many" ]
6,381,463
1
6,406,865
null
6
586
I have a model where a place has some descriptions, those descriptions are associated with interests (place.description.interests). A user looking at the view for a place is represented in the model as a user, who also has a number of interests. What I want to do is sort the description by overlapping interests (including zero overlapping), where my current Linq is: ``` place dest = (from p in _db.places where p.short_name == id select p).Single(); return View(dest); ``` Now the following will do what I want in SQL on the schema in question: ``` SELECT COUNT(interest_user.user_id) AS matches, description.* FROM description JOIN interest_description ON description.user_id = interest_description.user_id AND description.place_id = interest_description.place_id JOIN interest ON interest_description.interest_id = interest.interest_id LEFT JOIN interest_user ON interest.interest_id = interest_user.interest_id WHERE interest_user.user_id = 2 AND description.place_id = 1 GROUP BY interest_description.user_id, interest_description.place_id ORDER BY matches DESC ``` But I'm too new to Linq to know how I would handle this correctly. Ideally I could pull this off while still passing in a strongly typed model. I have managed this so far: ``` var desc = from d in _db.descriptions from i in d.interests from u in i.users.DefaultIfEmpty() where d.place_id == PlaceID && (u.user_id == userID ``` (PlaceID and UserID are arguments passed to the controller that is managing this). Simply put, given this linq, I just need to return d, ordered by a count of i. ![enter image description here](https://i.stack.imgur.com/lu2Yw.png)
Finding Overlapping Interests in LINQ
CC BY-SA 3.0
0
2011-06-17T04:50:21.760
2011-06-25T22:21:18.900
2011-06-20T04:23:58.293
560,797
560,797
[ "c#", "entity-framework", "linq-to-entities" ]
6,381,706
1
6,382,109
null
1
465
I have a parent & child elements in my web page where both have separate event handlers defined for them. I have tested in firefox, where the event handler for parent element gets executed first. I want it to execute the other way - child element's event handler getting executed first. I have read about making use of bind, stopPropagation, preventDefault etc. make that happen but I am a bit confused as a to how to get this working? Can somebody shed some light on this topic? Here is how I am implementing the event handling.... ``` $('#Sidebar ul li .DeleteList').live('click', function(e) { alert("I was deleted"); }); $('#Sidebar ul').delegate('li', 'click', function(e) { alert("I was selected"); }); ``` ![enter image description here](https://i.stack.imgur.com/pqrhw.png)
How to implement event order in parent/child elements using jquery
CC BY-SA 3.0
null
2011-06-17T05:30:51.180
2011-06-17T06:26:31.270
2011-06-17T05:41:15.113
206,613
206,613
[ "event-handling", "event-bubbling", "jquery" ]
6,381,902
1
6,382,292
null
0
436
have a look at my code. [http://jsfiddle.net/Q8V4H/6/](http://jsfiddle.net/Q8V4H/6/) The text within p element Telephone Dialer is being aligned using top-down approach whereas i want to align it in the center from all positions i,e top right bottom and left. here is the example output my code is producing. ![enter image description here](https://i.stack.imgur.com/gv5Br.png) I don't want any space there instead the text Download PC Dialer should be aligned in center of the div i.e from left,right,top,bottom and not just left and right. here is the example image of what i want to achieve. ![enter image description here](https://i.stack.imgur.com/XKFtK.png) if i use `text-align:center` it will only align the text in center from left and right, not from top and bottom, and in this case i want to align it from top and bottom too. how do i do it? thank you
Is there anyway to align text in center from all positions instead of default top-down using CSS?
CC BY-SA 3.0
null
2011-06-17T05:58:23.450
2011-06-17T06:48:27.333
null
null
396,476
[ "html", "css", "positioning" ]
6,382,211
1
6,383,416
null
6
2,732
How can I hide .svn folder in Eclipse and not show empty packages at the same time? ![enter image description here](https://i.stack.imgur.com/TU9QA.png) Eclipse shows these packages because there is a .svn folder there. I'm using TortoiseSVN.
How to hide .svn folder in Eclipse and not show empty packages?
CC BY-SA 3.0
0
2011-06-17T06:39:22.223
2015-02-11T13:52:32.703
2012-07-25T08:04:48.320
599,857
272,869
[ "java", "eclipse", "svn", "tortoisesvn" ]
6,382,226
1
null
null
3
17,122
![Two related database tables with a left join](https://i.stack.imgur.com/F8U4P.png) --- I found no answers to this question which is also asked on many other forums. Although I have the tables IAS_FORM_BKT_BAYI and IAS_FORM_BKT_BAYI_SO present in the database, with the annotated entity class (the source code below the exception) I'm getting this exception in my JSF & Hibernate-based application: ``` org.hibernate.AnnotationException: Cannot find the expected secondary table: no IAS_FORM_BKT_BAYI available for net.ozar.bpm.entity.bkt.Bayi org.hibernate.cfg.Ejb3Column.getJoin(Ejb3Column.java:293) org.hibernate.cfg.Ejb3Column.getTable(Ejb3Column.java:272) org.hibernate.cfg.annotations.SimpleValueBinder.make(SimpleValueBinder.java:222) org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1898) org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279) org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754) org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546) org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291) org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148) org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226) org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173) org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854) org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:191) org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:253) org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125) javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60) net.ozar.bpm.util.EntityUtil.getEntityManagerFactory(EntityUtil.java:13) net.ozar.bpm.util.EntityUtil.getEntityManager(EntityUtil.java:21) net.ozar.bpm.servisler.CalisanJpaController.getEntityManager(CalisanJpaController.java:31) net.ozar.bpm.servisler.CalisanJpaController.getPersonId(CalisanJpaController.java:120) net.ozar.bpm.web.jsfmanaged.LoginBean.oturumAc(LoginBean.java:122) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.apache.el.parser.AstValue.invoke(AstValue.java:191) org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) javax.faces.component.UICommand.broadcast(UICommand.java:387) org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321) org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296) org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253) org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517) net.ozar.bpm.web.filters.RestrictPageFilter.doFilter(RestrictPageFilter.java:180) ``` ``` @Entity @Table(name = "IAS_FORM_BKT_BAYI") @SecondaryTable(name="IAS_FORM_BKT_BAYI_SO", pkJoinColumns = @PrimaryKeyJoinColumn(name="CUSTOMER_ID")) public class Bayi implements Serializable { private static final long serialVersionUID = 8681843504687728382L; @Id @Basic(optional = false) @NotNull @Column(table="IAS_FORM_BKT_BAYI", name = "CUSTOMER_ID", nullable = false) private Integer customerId; @Basic(optional = false) @NotNull @Size(min = 1, max = 30) @Column(table="IAS_FORM_BKT_BAYI", name = "CUSTOMER_NUMBER", nullable = false, length = 30) private String customerNumber; @Size(max = 50) @Column(table="IAS_FORM_BKT_BAYI", name = "CUSTOMER_NAME", length = 50) private String customerName; @Size(max = 50) @Column(table="IAS_FORM_BKT_BAYI", name = "VERGI_DAIRESI", length = 50) private String vergiDairesi; @Size(max = 20) @Column(table="IAS_FORM_BKT_BAYI", name = "VERGI_NO", length = 20) private String vergiNo; @Size(max = 150) @Column(table="IAS_FORM_BKT_BAYI", name = "OPERATOR", length = 150) private String operator; @Column(table="IAS_FORM_BKT_BAYI_SO", name = "SOZLESME", length = 5) private String sozlesme; @Column(table="IAS_FORM_BKT_BAYI_SO", name = "SOZLESME_UYGUN", length = 5) private String sozlesmeUygun; @Column(table="IAS_FORM_BKT_BAYI_SO", name = "KEFIL_IMZA", length = 5) private String kefilImza; @Column(table="IAS_FORM_BKT_BAYI_SO", name = "ACIKLAMA", length = 2000) private String aciklama; public Bayi() { } // getters and setters // ... } ``` What I'm really trying to achieve is get the resultset which I obtain running the following query mapped to the Bayi (entity) object: ``` SELECT B.CUSTOMER_ID, B.CUSTOMER_NUMBER, B.CUSTOMER_NAME, B.VERGI_DAIRESI, B.VERGI_NO, C.SOZLESME, C.SOZLESME_UYGUN, C.KEFIL_IMZA, C.ACIKLAMA FROM IAS_FORM_BKT_BAYI B LEFT JOIN IAS_FORM_BKT_BAYI_SO C ON B.CUSTOMER_ID = C.CUSTOMER_ID WHERE ORG_ID = 102 ```
Why cannot Hibernate find secondary table in an Entity?
CC BY-SA 3.0
0
2011-06-17T06:41:08.393
2021-12-02T22:27:27.747
null
null
499,543
[ "hibernate", "join", "entity", "left-join" ]
6,382,308
1
null
null
0
74
![The error](https://i.stack.imgur.com/8dqbS.jpg) Please help me guys. . . OS: windows Rails: 3.0.8
part II rake db:create problem
CC BY-SA 3.0
null
2011-06-17T06:50:07.300
2011-06-17T08:02:14.303
null
null
765,608
[ "mysql", "ruby-on-rails-3", "rake" ]
6,382,415
1
6,382,939
null
3
1,238
I am trying to develop a custom radio button that looks like a two-option button control that looks somewhat as shown below with toggling of highlighted state. Not sure where to start. ![enter image description here](https://i.stack.imgur.com/8HnNT.png) Is there any such controls already available that I can use.
Silverlight: Custom Radio button
CC BY-SA 3.0
0
2011-06-17T07:00:51.963
2011-06-17T07:59:13.763
null
null
94,169
[ "c#", "silverlight" ]
6,382,557
1
6,382,607
null
0
3,155
[Here's an email template with HTML.](http://dev.corp.doosan.com/doosaninfracore/newsletter.html) And I tried to copy it in web browswer and paste in Outlook 2007. But it looks different because `border="0" cellpadding="0" cellspacing="0"` doesn't work in email. For the worse, it varies from the each email system(Outlook, Gmail, hanmail...). Is there any way to work HTML perfectly in every email system? Thanks, always. ======================= This is what it should be. ![enter image description here](https://i.stack.imgur.com/Mo75c.jpg) And this is from DAUM Hanmail, ![enter image description here](https://i.stack.imgur.com/1HQIQ.jpg) and Gmail. ![enter image description here](https://i.stack.imgur.com/enxxf.jpg)
Some HTML attributes are not working in email.(border, cellspacing...)
CC BY-SA 3.0
null
2011-06-17T07:17:40.477
2011-06-17T07:25:45.910
2011-06-17T07:25:45.910
411,615
411,615
[ "email", "outlook" ]
6,382,570
1
null
null
13
37,947
I want to build a tree with the following characteristics: 1. Every node can have 1 "next node". 2. Every node can have multiple child nodes. 3. The number of child nodes can vary from one node to the other I was thinking of a struct which looked like this: ``` struct tree { int value; struct tree* nextnode; struct tree** childnode; }; ``` The number of children at each node has to be parametrized. I am not sure how to do this. Thanks in advance! : Let me try to define it using an example: Let us take the starting node. Now, I will define at compile time that there will be 3 `NextNodes` and each of these `NextNodes` will have 2 `ChildNodes`. This is at `Depth=0`. At `Depth = 1` (i.e. for each child node from `Depth=0`) I specify that there will be 4 `NextNodes` and for each of these `NextNodes` there will be 3 `ChildNodes` and so on. Hope I am able to convey it properly. Please do ask if I am not clear somewhere. : Here is a pic: ![Here is a pic](https://i.stack.imgur.com/Uc3QZ.jpg)
Tree with multiple child nodes and next node
CC BY-SA 3.0
0
2011-06-17T07:19:26.493
2020-03-13T10:17:35.297
2013-08-06T15:57:03.227
244,353
560,913
[ "c", "pointers", "data-structures", "tree" ]
6,382,612
1
28,515,017
null
7
3,959
Is there a python equivalent function similar to `normplot` from MATLAB? Perhaps in matplotlib? MATLAB syntax: ``` x = normrnd(10,1,25,1); normplot(x) ``` Gives: ![enter image description here](https://i.stack.imgur.com/eSW5a.gif) I have tried using matplotlib & numpy module to determine the probability/percentile of the values in array but the output plot y-axis scales are linear as compared to the plot from MATLAB. ``` import numpy as np import matplotlib.pyplot as plt data =[-11.83,-8.53,-2.86,-6.49,-7.53,-9.74,-9.44,-3.58,-6.68,-13.26,-4.52] plot_percentiles = range(0, 110, 10) x = np.percentile(data, plot_percentiles) plt.plot(x, plot_percentiles, 'ro-') plt.xlabel('Value') plt.ylabel('Probability') plt.show() ``` Gives: ![enter image description here](https://i.stack.imgur.com/1VvER.png) Else, how could the scales be adjusted as in the first plot? Thanks.
Python equivalent for MATLAB's normplot?
CC BY-SA 3.0
0
2011-06-17T07:24:17.827
2015-02-14T11:37:52.820
null
null
628,103
[ "python", "numpy", "matplotlib", "scipy", "probability" ]
6,382,646
1
6,385,832
null
1
5,905
Are there any libraries available that can help to change the of ? Here is a snapshot of an application that runs on : ![enter image description here](https://i.stack.imgur.com/Pu08w.png) I think its made using the .net framework, but how can it be styled like this? - Even if its not built using .net framework, then please let me know which language supports the UI customization on windows platform. - As everyone is suggesting me to go with WPF or SWING using JAVA, I still want to know if its possible in VB.net WinForms or not.
UI library for VB.net Desktop Applications
CC BY-SA 3.0
null
2011-06-17T07:27:35.083
2011-06-17T12:38:18.277
2011-06-17T10:34:28.147
668,008
668,008
[ "vb.net", "user-interface" ]
6,383,054
1
7,775,716
null
34
55,431
How can I create a certificate using `makecert` with a 'Subject Alternative Name' field ? ![enter image description here](https://i.stack.imgur.com/91nKz.jpg) You can add fields eg, 'Enhanced Key Usage' with the -eku option and I've tried the -san option but makecert doesn't like it. This is a self-signed certificate so any method that uses IIS to create something to send off to a CA won't be appropriate.
add or create 'Subject Alternative Name' field to self-signed certificate using makecert
CC BY-SA 3.0
0
2011-06-17T08:11:15.333
2020-11-17T15:57:50.603
null
null
224,410
[ "certificate", "x509certificate", "self-signed", "makecert" ]
6,383,282
1
6,383,318
null
0
236
``` case "4": //Enumeration RadioButton c = new HtmlTableCell(); RdSecimler = new RadioButtonList(); RdSecimler.ID = "Rdl_" + item.new_survey_questionid.ToString(); RdSecimler.RepeatDirection = RepeatDirection.Horizontal; RdSecimler.CellPadding = 2; c.Align = "center"; RdSecimler.Attributes.Add("class", "TblCss"); for (int i = Convert.ToInt32(item.new_min_enumerator); i <= Convert.ToInt32(item.new_max_enumerator); i++) { LiSecim = new ListItem(); LiSecim.Text = i.ToString(); RdSecimler.Items.Add(LiSecim); } c.Controls.Add(RdSecimler); RequiredFieldValidator Rfv_Rd_Btn = new RequiredFieldValidator(); Rfv_Rd_Btn.ControlToValidate = "Rdl_" + item.new_survey_questionid.ToString(); Rfv_Rd_Btn.ErrorMessage = lbl_survey_error_msg.Text; plch.Controls.Add(Rfv_Rd_Btn); ``` ![enter image description here](https://i.stack.imgur.com/RJsmy.jpg) I've a survey dynamically generated and this part generates radiobuttonlist for the specified question types. I want to validate it but I've 11 questions for that part and it shows me 9 error messages for 9 empty, but I want only one error message overall. How can I do that?
RequiredFieldValidator
CC BY-SA 3.0
null
2011-06-17T08:35:13.383
2011-06-17T13:05:59.933
2011-06-17T13:05:59.933
650,492
799,226
[ "c#", "asp.net", "validation" ]
6,383,469
1
6,465,982
null
0
367
I have a fairly standard layout for the first screen of the setup wizard on my app. I have been developing it with a solid color background which I defined in a theme. I have recently got a png file that I would like to used as the background. This works fine on all screens apart from the 3 screens for the setup wizard. The problem being that only the first textview is drawn. I used the hierachy viewer and the other views where not listed. These are the only screens that use an include statement so I suspect this may be the root of the problem but even if I take out the include statement I still have the problem. ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/welcome" android:text="@string/welcome" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10dip" android:gravity="center_horizontal" android:textColor="#433A33" android:textStyle="bold"> </TextView> <ImageView android:id="@+id/mainIcon" android:src="@drawable/main_icon" android:layout_width="100dip" android:layout_height="100dip" android:layout_centerHorizontal="true" android:layout_below="@+id/welcome"> </ImageView> <TextView android:id="@+id/description" android:text="@string/description" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10dip" android:layout_below="@+id/mainIcon" android:gravity="center_horizontal" android:textColor="#433A33" android:textSize="15dip"> </TextView> <TextView android:id="@+id/choice" android:layout_below="@id/description" android:text="@string/choice" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10dip" android:gravity="center_horizontal" android:textColor="#433A33" android:textSize="15dip"> </TextView> <Spinner android:id="@+id/language" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/choice" android:prompt="@string/languagePrompt" android:textSize="10dip" android:layout_marginRight="20dip" android:layout_marginLeft="20dip"> </Spinner> <include layout="@layout/wizard_bottom" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </RelativeLayout> ``` Let me know if anybody has any ideas. ![enter image description here](https://i.stack.imgur.com/gOJSL.png)
Disappearing Views
CC BY-SA 3.0
null
2011-06-17T08:53:31.253
2011-06-24T09:34:27.643
2011-06-17T09:36:46.507
690,681
690,681
[ "android", "xml" ]
6,383,563
1
null
null
3
236
I profiled my WCF application using the .NET Memory Profiler, and found that there is instance leak of types TimeBoundedCache.ExpirableItem and Byte[]: ![enter image description here](https://i.stack.imgur.com/xubaY.png) The comparison was made using two snapshot with 1 hour interval, and comparisons at different times also show the consistently increasing number of the two type. Other than those two types, there is no apparent leak. The allocation stack looks like this: ![enter image description here](https://i.stack.imgur.com/6n2vm.png) Does anyone recognize what might be causing this?
What kind of leak can cause instance leak of TimeBoundedCache.ExpirableItem in WCF?
CC BY-SA 3.0
null
2011-06-17T09:02:36.930
2011-06-17T16:39:24.320
2011-06-17T12:59:51.667
385,387
385,387
[ ".net", "wcf", "memory-leaks", "memory-profiling" ]
6,383,611
1
11,467,726
null
0
1,042
![enter image description here](https://i.stack.imgur.com/c9liD.png) i have a web service developed with `PHP` bith (client and server ) using Libraries .. i required to connect the web services sever to a `C#` winforms app to do the processing of the data which come to the server .. is it possible to do ? connect to a web-service as a client in C# is fine but interconnect with the web service server ?
Interconnecting PHP web service server and C# win form application
CC BY-SA 3.0
null
2011-06-17T09:07:23.697
2012-07-13T09:28:12.270
2011-06-17T09:43:31.683
296,231
296,231
[ "c#", "php", "web-services" ]
6,383,665
1
6,387,936
null
1
1,003
Hi a have WCF service libary with this configuration: ``` <?xml version="1.0"?> <configuration> <system.serviceModel> <services> <service behaviorConfiguration="Default" name="ComDocs.ControlServerServiceLibary.Concrete.TokenService"> <host> <baseAddresses> <add baseAddress="http://localhost:8080/TokenService" /> </baseAddresses> </host> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <endpoint address="basic" binding="basicHttpBinding" contract="ComDocs.ControlServerServiceLibary.Abstract.ITokenService" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="Default"> <serviceMetadata httpGetEnabled="true" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration> ``` If I build it in debug, everything works fine on localhost. But if I make a Windows Service library with the same configuration: ``` public partial class TokenService : ServiceBase { ServiceHost _host = null; public TokenService() { InitializeComponent(); } protected override void OnStart(string[] args) { Trace.WriteLine("Starting Token Service..."); _host = new ServiceHost(typeof(TokenService)); _host.Open(); } protected override void OnStop() { Trace.WriteLine("Shutting down Token Service..."); if (_host != null) { _host.Close(); _host = null; } } } ``` Install it with InstallUtil and start it: ![enter image description here](https://i.stack.imgur.com/6Mfu4.png) but error: ![enter image description here](https://i.stack.imgur.com/bBbMV.png)
WCF windows service, Service metadata may not be accessible
CC BY-SA 3.0
null
2011-06-17T09:12:26.340
2011-06-17T15:15:33.647
2011-06-17T14:56:10.253
51,170
600,082
[ "wcf", "windows-services" ]
6,383,690
1
null
null
0
104
in some documents I open in MacVim I get `>>` next to my line numbers and I can't find out what the meaning is. ![enter image description here](https://i.stack.imgur.com/utwxY.png) I have [janus](https://github.com/carlhuda/janus/) installed and probably it is one of the plugins. Thanks for any hint.
MacVim output question
CC BY-SA 3.0
null
2011-06-17T09:14:21.697
2011-06-18T16:02:10.277
2011-06-18T15:58:36.343
null
598,111
[ "macvim" ]
6,383,873
1
6,384,093
null
3
1,499
What should be the best way to create a effect like this and the handling of navigation controllers and view controllers ... what to do if I don't want to re-size each subsequent view in viewcontorller and things appear as if it is a tabBar ![enter image description here](https://i.stack.imgur.com/vFEG9.png)
Approach to make a custom tabBar
CC BY-SA 3.0
0
2011-06-17T09:32:32.183
2011-06-17T11:34:34.497
2011-06-17T11:13:36.627
459,624
459,624
[ "iphone", "custom-controls", "uitabbar" ]
6,383,926
1
6,384,067
null
0
215
I am trying to align label text vertically aligned for my iPhone application Timer. Basically it's a game application and timer value appears in MM:SS format in label in landscape mode. When I have added label and tried to set this value it appears like image 1 which is not correct. I found from many threads that you can set multiple line and make label width as one char but it appears like image 2 which is also wrong. I want my timer value to appear as image 3. Could anyone please tell me how could I achieve it? Thanks. [Added real picture of what I am trying to do] ![enter image description here](https://i.stack.imgur.com/C4495.png) ![The timer in land scape mode....not correct](https://i.stack.imgur.com/wcKPZ.png) ![The timer when I set multiple lines for each digit...](https://i.stack.imgur.com/c493f.png) ![I want this is to happen...](https://i.stack.imgur.com/qZS3d.png)
iPhone: Verticle alignment for Numbers in Label in Landscape mode
CC BY-SA 3.0
null
2011-06-17T09:39:20.983
2011-06-17T11:15:54.133
2011-06-17T10:45:56.120
587,736
587,736
[ "iphone", "uilabel", "vertical-alignment" ]
6,383,952
1
6,384,297
null
4
871
I have the following db table ![enter image description here](https://i.stack.imgur.com/ntN95.png) 82 is the parent of 84. 24 is the parent of 82 and 83. In php I have a method to fetch rows by uid. ``` public function fetchByUid($uid){ //code } ``` This would retrieve the 7th and 6th value from the table. Now I want to fetch not only the rows where uid is equal but also the rows where the parent is the child of uid. E.g. 82 is a parent of 84 but also a child of 24. So I came up with some recursion. ``` public function fetchByUidRec($uid, $data, $counter){ //set of rows by uid $db_resultSet; foreach($db_resultSet as $row){ $entry = array(); $entry['id'] = $row->id; $entry['uid'] = $row->uid; $entry['rid'] = $row->rid; $entry['layer'] = $counter; $data [] = $entry; //now I want to do the same on the child $data [] = fetchByUidRec($row->rid, $data, $counter = $counter + 1) } return $data; } public function getchByUid($uid){ $data = array(); $counter = 0; return fetchByUidRec($uid, $data, $counter) } ``` But that does not work at all :( I want to store the current recrusion depth in $data['layer'] Any ideas?
Get recursive depth for every row
CC BY-SA 3.0
0
2011-06-17T09:41:20.330
2011-06-17T10:40:52.543
null
null
401,025
[ "php", "mysql", "recursion" ]
6,384,237
1
null
null
4
2,876
At our office, we have a development server : Win 2k8 server R2 - Coldfusion 9(.0.0) - MySQL 5 ... Almost every morning when I arrive at work, I find the server with the CPU at 50%. But... What does he do ? See the screenshots : ![enter image description here](https://i.stack.imgur.com/JIOfh.png) ![enter image description here](https://i.stack.imgur.com/AknJf.png) You can see that the CPU is +- 50% of use and it's well jrun.exe who does that! To trying to understand what's happened, I go to the Server monitor and, no active thread or request! The monitors are declaring that nothing is happened... There is no scheduled task programmed. Do you have an advice for me? Somewhere where I can get more information? Thank you. --- Update 20 June: A new week begin and my server still works for nothing :) Now I can monitoring him with VisualVM but I don't know where I had to look. Monitor: ![visualVM Graph's](https://i.stack.imgur.com/sN1WY.png) Threads: ![visualVM Threads](https://i.stack.imgur.com/fWZEp.png) CFStat : ![enter image description here](https://i.stack.imgur.com/cxfEA.png) I don't know which running process is driven to consume CPU...
Coldfusion continuous high CPU usage
CC BY-SA 3.0
null
2011-06-17T10:06:25.750
2012-12-10T18:33:37.037
2012-12-10T18:33:37.037
1,845,869
305,317
[ "coldfusion" ]
6,384,303
1
7,468,053
null
12
7,915
I have a `xAxis` which is in datetime format on highcharts. I send millisecond position of `xAxis` to place point on chart. The total time on `xAxis` is about 2 years. But I want to show tick only where there are some points (about 6 points). For the moment, ticks are show at regular interval with the date. Here is what I have : ![enter image description here](https://i.stack.imgur.com/B9XQa.png) And what I need : ![enter image description here](https://i.stack.imgur.com/N2zhs.png) thanks,
Highcharts, Show specific tick on a datetime xaxis type
CC BY-SA 4.0
0
2011-06-17T10:13:30.593
2020-03-03T00:18:48.590
2020-03-03T00:18:48.590
12,938,545
210,456
[ "jquery", "jquery-plugins", "highcharts" ]
6,384,353
1
null
null
0
987
I would like to make a simple operation with but I cannot find the right way. I have the following tables, hereby represented with an class diagram: ![EF-generated class diagram](https://i.stack.imgur.com/x3u64.jpg) Where the foreign key relationship is on (primary key table ). I want to make a query that returns with its corresponding children on , by . Taking into account that is the repository object, I already tried the solutions that looked more logic to me: ``` WebinarSession lsession = _webinarRecordingsDB.WebinarTopics .OrderBy(m => m.TopicStartTime) .Select(m => m.WebinarSession) .Single(m => m.SessionId == sessionId); WebinarSession lsession = _webinarRecordingsDB.WebinarSessions .Single(m => m.SessionId == sessionId).WebinarTopics .OrderBy(m => m.TopicStartTime) .Single(m => m.WebinarSession.SessionId == sessionId); ``` Those launch an exception because they find more rows in WebinarSession. As last (illogical) resort I also tried: ``` WebinarSession lsession = _webinarRecordingsDB.WebinarSessions .Single(m => m.SessionId == sessionId); lsession.WebinarTopics.OrderBy(m => m.TopicStartTime); ``` that does not launch any exception but does not perfor the sorting on lsession. Anybody might help me please? Thanks I want to keep the result in a object
Return single row in an EF-generated class with its children set ordered in LinqToSql (c#)
CC BY-SA 3.0
null
2011-06-17T10:17:57.393
2011-06-17T10:52:16.823
2011-06-17T10:52:16.823
675,082
675,082
[ "c#", "entity-framework", "linq-to-sql", "sql-order-by" ]
6,384,663
1
6,384,703
null
1
6,519
I have surrounded the text with bold tag, It renders differently in IE and Chrome. IE image --> ![enter image description here](https://i.stack.imgur.com/HQvvZ.png) Chrome image --> ![enter image description here](https://i.stack.imgur.com/JSB10.png) Can anyone please figure out what can be done here? Thanks
Different effect of bold tag in IE and chrome
CC BY-SA 3.0
0
2011-06-17T10:51:10.793
2011-06-17T11:01:58.570
null
null
549,757
[ "html", "css", "google-chrome", "internet-explorer-8", "bold" ]
6,384,659
1
6,981,567
null
109
87,591
I get this error when writing to the database: > A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: 'PaymentId'. ``` public bool PayForItem(int terminalId, double paymentAmount, eNums.MasterCategoryEnum mastercategoryEnum, int CategoryId, int CategoryItemId) { using (var dbEntities = new DatabaseAccess.Schema.EntityModel()) { int pinnumber = 0; long pinid = 1; //getPinId(terminalId,ref pinnumber) ; var payment = new DatabaseAccess.Schema.Payment(); payment.CategoryId = CategoryId; payment.ItemCategoryId = CategoryItemId; payment.PaymentAmount = (decimal)paymentAmount; payment.TerminalId = terminalId; payment.PinId = pinid; payment.HSBCResponseCode = ""; payment.DateActivated = DateTime.Now; payment.PaymentString = "Payment"; payment.PromotionalOfferId = 1; payment.PaymentStatusId = (int)eNums.PaymentStatus.Paid; //payment.PaymentId = 1; dbEntities.AddToPayments(payment); dbEntities.SaveChanges(); } return true; } ``` The schema is: ![enter image description here](https://i.stack.imgur.com/ygkYW.png)
A dependent property in a ReferentialConstraint is mapped to a store-generated column
CC BY-SA 3.0
0
2011-06-17T10:50:53.337
2022-07-13T12:24:31.710
2016-05-12T18:02:29.780
153,797
788,101
[ "c#", "sql-server-2008", "linq-to-sql", "entity-framework-4" ]
6,384,683
1
6,384,739
null
0
1,371
I have a table with 14 td within tr. After the first row(tr) I want to add dynamic row(tr) and div within tr using jquery. That dynamically added tr and div will have other table with some data. Now what happens is that whole table (dynamically added) fits in first td of the dynamically added row. I don't want this, I want it to be stretched throughout the page (means fit in dynamically added tr). How do you do that? ![screenshot of table](https://i.stack.imgur.com/cZAux.jpg) In the image you can see how the whole table in fitted within first td I am adding dynamic tr and div inside tr like this ``` $('#'+row_id).after('<tr><div id="trip_detail_id"></div></tr>'); ``` where `row_id` is the id of the tr.
Div inside table
CC BY-SA 4.0
null
2011-06-17T10:52:41.013
2020-07-02T15:23:16.413
2020-07-02T15:23:16.413
2,803,788
800,875
[ "html", "css", "jquery-ui", "stylesheet" ]
6,384,780
1
6,384,800
null
1
394
i am working on asp .net mvc3. i have following table ![enter image description here](https://i.stack.imgur.com/Cl0wC.png) i want to select minimum quanity where ProductID=1 please help to find out the exact query for above requirement.
select minimum quantity where productID =1
CC BY-SA 3.0
0
2011-06-17T11:00:25.963
2011-06-17T12:35:54.080
2011-06-17T11:23:49.313
297,267
887,872
[ "sql-server", "asp.net-mvc", "tsql" ]
6,384,784
1
null
null
2
5,003
I am generating a line chart/graph by fetching data from the database. I want to change the orientation of the labeling from horizontal to vertical on the x-axis. ![enter image description here](https://i.stack.imgur.com/ApONt.jpg)
Crystal Reports: X/Y axis Label orientation
CC BY-SA 3.0
null
2011-06-17T11:00:53.440
2011-08-12T15:40:00.763
null
null
540,310
[ "visual-studio", "visual-studio-2008", "crystal-reports", "crystal-reports-2008" ]
6,384,846
1
6,393,162
null
1
502
I have made a UIImagePickerController with a custom overlay view in order to enhance the interface and it's working great the first time I load it, it's perfect. The problem is that if I dismiss it and then shows it again I have a strange bug. the camera view and the overlay appear behind the NavBar and the TabBar of the previous view controller. I have try different ways of implementing this but I can't get this bug solved. Here is how I call my UIImagePickerController. It's inspired by [this sample code](https://i.stack.imgur.com/6rvMZ.jpg). ``` [self.cameraOverlayViewController setupImagePicker:UIImagePickerControllerSourceTypeCamera]; [self presentModalViewController:self.cameraOverlayViewController.imagePickerController animated:YES]; ``` Once my picture taken, I dismiss the UIImagePickerController: ``` [self dismissModalViewControllerAnimated:YES]; ``` Definitly nothing special in the way of implementing it. And here 2 screenshots: ![At first launch](https://i.stack.imgur.com/6rvMZ.jpg) And now taken at second launch: [At second launch http://puic.dev.madebykawet.com/IMG_0929.PNG](http://puic.dev.madebykawet.com/IMG_0929.PNG) Thanks for your answers !
Customized UIImagePickerController issue when loaded a second time
CC BY-SA 3.0
null
2011-06-17T11:07:08.047
2012-03-07T17:45:22.970
2012-03-07T17:45:22.970
689,356
738,529
[ "iphone", "objective-c", "ios4" ]
6,384,993
1
6,385,014
null
0
444
I am trying to position some stuff in 3 columns. The first column has an icon, 2nd column has text, and the 3rd column has an image. I wish to do this without using the Table tag. Using CSS I have gotten the first 2 columns placed correctly, here is an image: ![What I got so far...](https://i.stack.imgur.com/RWBBD.png) On the right, I need to add another image, without disturbing the text on the left. This is my HTML code (stripped down to the basics): ``` <img src="Images/icon-1.png" /> <span class="content-title">My title 1</span> <p> Here is my text ... </p> <br /> <img src="Images/Icon-2.png" /> <span class="content-title">My Title 2</span> <p> Here is my text ... </p> <br /> ``` And the CSS that emulates the table layout: ``` .content-title { font-size: 26px; font-family: Helvetica,Arial,sans-serif; color: #363636; top: -28px; position:relative; left:+10px; font-weight: bold; } #content-benefits p { margin-left:80px; top:-30px; position:relative; width:325px; } ``` My issue is, that I can't figure out how to place my image on the right, without making it's `position:absolute;`, but if I do that, I have to (AFAIK) use JavaScript to place the images relatively to their corresponding paragraphs.
Positioning elements like a table, without using the table tag
CC BY-SA 3.0
null
2011-06-17T11:20:09.220
2011-06-17T11:38:20.800
null
null
561,545
[ "html", "css", "position" ]
6,385,055
1
6,386,867
null
1
158
I have an NSTableView (URLs of songs) and QTMovieView elements. I need to create an action that will execute when previous/next buttons on QTMovieView will be pressed. what I need to do? ![](https://i.stack.imgur.com/2GH3f.jpg)
next/previous track buttons action
CC BY-SA 3.0
null
2011-06-17T11:25:46.860
2011-06-17T13:55:50.283
2020-06-20T09:12:55.060
-1
1,738,921
[ "objective-c", "cocoa", "qtkit" ]
6,385,142
1
null
null
0
92
I'm working on a web site which content and positioning of the elements loads from database, each element (text, form, images) loads inside a div with absolute positioning, using the top attribute of the div for vertical psition. it works fine most of the time and the elements render and look how they suppose to. How ever when i load large amount of text on a div element the space between the content and the div changes in different OS, or browser versions, im not sure which but i think its on different os because firefox 3.6.17 look different on windos xp and mac os. Im pretty sure its because the fonts are reendered different in different browser which cause this inconsistence. Problem comes when i want to show another element below the first content, the space between them changes heavily, causing that in some OS/Browser the second element looks way bellow the content, and so some people don´t look at this second element because they think the page is over. However the div them self are well positioned ![Windowss IE8](https://i.stack.imgur.com/QF52J.jpg) ![Macos Safari](https://i.stack.imgur.com/KLHjN.png) I was looking into Google WebFont Loader, but i think this solution only focus in the loading process of a font and uses Javascript to make them behave the same, but not look the same. It still needs some tests, but it occurred to me that the only way to fix this is with javascript, and i was wondering if some one have encounter a similar problem, or if you have a suggestion, cause it would be of great use for us! thank you!
Different Browser and OS render different the fonts is causing absolute divs to look differently
CC BY-SA 3.0
null
2011-06-17T11:34:39.550
2011-06-17T11:48:24.490
null
null
360,903
[ "html" ]
6,385,205
1
6,385,232
null
35
44,083
I have a class with a subclass. The superclass has a `Position` property. The subclass must perform an additional operation when the `Position` property is changed, so I am attempting to override the setter method and call the superclass' setter. I think I've got the superclass setter calling part down, but I can't figure out how the overriding syntax works here. Here is my best attempt: ![code](https://i.stack.imgur.com/RJQB0.png) The getter is there just for proof of concept -- suppose I wanted to override that too? The getter and setter give me errors of this form: > cannot override inherited member 'superClassName.Position.[gs]et' because it is not marked virtual, abstract, or override Here's a screencap of the errors too for good measure: ![errors](https://i.stack.imgur.com/eZ82X.png) I also tried using the override keyword in front of the `set`. Removing the superfluous getter has no effect. What is the correct syntax?
How do I override the setter method of a property in C#?
CC BY-SA 3.0
0
2011-06-17T11:40:05.423
2017-10-27T15:29:21.953
null
null
777,586
[ "c#", "get", "properties", "overriding", "set" ]
6,385,279
1
6,548,077
null
2
1,484
![AuthenticatorService](https://i.stack.imgur.com/6GwvG.png) How can obtain the last update date from the sync adapters services (marked with red) ?
Syncadapter last update date
CC BY-SA 3.0
null
2011-06-17T11:46:55.187
2011-07-06T20:13:02.403
null
null
655,302
[ "android", "android-syncadapter" ]
6,385,563
1
6,416,087
null
1
3,986
I have this HTML code in which a QR-code is generated via AJAX : ``` <div class="qr-border"> <p id="qr" class="ajax_qrcode{if $cart_qties < 1} hidden{/if}"></p> </div> ``` and I would like to set a border image around the QR-code. I have this image : ![small image to repeat](https://i.stack.imgur.com/wgwps.png) and a right corner image : ![corner image](https://i.stack.imgur.com/trKor.png) So I tried this in the CSS : ``` div.qr-border p.ajax_qrcode { text-align: center; padding-bottom: 1.0em; float: center; border-image: url('../img/qr-code-border/border.png') 27 27 27 27 stretch stretch; border-bottom-right-image: url('../img/qr-code-border/corner.png'); } ``` but nothing works... Do someone has any suggestion ? thank you for your help !
How do I set a border-image?
CC BY-SA 3.0
null
2011-06-17T12:12:02.247
2012-10-08T08:17:13.613
2011-06-17T12:38:51.927
749,021
749,021
[ "html", "css" ]
6,385,583
1
null
null
0
191
There is something in VS 2005 causing the new check-outs in another solutions of project file. Imagine There are 20 solutions in a Project of VS 2005 (.net 2.0 and c# ) Project names are: A , B , C ... S, T, A has some references from B or S... And when I build the solution A, it starts to check-out on me some of files from different solutions ( it may be a solution file or project file..) It did not use to happen two days ago.. It was normal only the files that I change are check-out to me. not others. Where should I go and check to make it the same as it use to build perfectly on TFS? ![I click build and it immediately starts check-out. Why?!](https://i.stack.imgur.com/3Jsy1.jpg)
What does build action cause new check-outs on in a project solution
CC BY-SA 3.0
null
2011-06-17T12:14:46.103
2018-01-28T10:49:17.920
2018-01-28T10:49:17.920
6,296,561
173,718
[ ".net", "tfs", "build", "visual-studio-2005", "vcs-checkout" ]
6,385,605
1
6,385,641
null
0
220
I have a 'detail' page where I am displaying info for a club. The page is a UIViewController and consists of buttons and labels to acheive this look (like small grouped tables). When I load this page on a device, it lags a bit, more than any other view in my app. I assume its because I have quite a few objects on the view controller. Does anyone have any suggestions on how to reduce this lag? Or how to achieve the look the 3 smaller tables like this(grouped) in a different way? Thanks. SCREENSHOT: ![enter image description here](https://i.stack.imgur.com/5nV1b.png)
iPhone UIViewController Lag
CC BY-SA 3.0
null
2011-06-17T12:16:31.780
2011-06-17T13:49:12.470
null
null
480,415
[ "iphone", "ios", "uiviewcontroller", "xib", "lag" ]
6,385,755
1
6,386,389
null
3
689
If I want to display one uniformly semi-transparent image, and then 'fade out' this image, gradually replacing it with another of the same transparency, while maintaining the combined transparency at a constant level during the transition, how do I determine what transparency to draw the images? By trial and error - drawing transparent images of various alphas on top of each other - I've come up with the graph below, showing transparency of image A on one axis and transparency of image B on the other. The 'isoalpha' lines show combinations of alpha that result in the same alpha all the way along the line. Each line is for a different level of alpha, with fully transparent at the top-left. You can see that the formula I'm looking for is not a straight linear transition with alphaA + alphaB == alphaTarget. What's the mathematical formula I am looking for? ![Alpha cross-fade graph](https://i.stack.imgur.com/KkmWx.png)
What's the formula for the combined transparency of two overlaid transparent images?
CC BY-SA 3.0
0
2011-06-17T12:31:23.343
2011-06-17T13:56:37.943
2011-06-17T13:20:22.747
25,457
25,457
[ "graphics", "alpha", "alphablending", "imaging" ]
6,385,908
1
6,516,706
null
5
4,189
I was just looking at one of the implemented in IPhone which contains labels and buttons. ![enter image description here](https://i.stack.imgur.com/8HPSs.png) How can I get this kind of window in Android containing labels, buttons and an image as well? Kindly provide me source for the same. Stone
Custom tap window on Google Map
CC BY-SA 3.0
0
2011-06-17T12:44:48.130
2011-06-29T07:30:36.353
null
null
null
[ "android" ]
6,385,941
1
null
null
1
2,529
I want to bind the combobox's selected value to the bounded object property, and also set the selected index of every combobox to 0. The problem is that only first combo shows the selected item. ``` public enum SubEnum1 { Apple=1, Banana=2, Pear=3 } public enum FullEnum { Apple=1, Banana=2, Pear=3, Cucumber=4, Tomato=5, Onion=6 } ``` Im XAML window i have some data control (list) where is a datatemplate that has a combobox. comboboxes are bounded to SubEnum1. The data-control is bounded to an object-collection: ``` List<MyObject> collection = new List<MyObject>() //collection.Add... mylist.ItemsSource = collection; public class MyObject { public FullEnum TheSelectedEnum {get;set;} .... //other properties } public class EnumConverter2 : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) return (FullEnum)value; else return ""; } } <ObjectDataProvider x:Key="Enum1" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> <ObjectDataProvider.MethodParameters> <x:Type TypeName="local:SubEnum1" /> </ObjectDataProvider.MethodParameters> </ObjectDataProvider> <ListBox Height="261" HorizontalAlignment="Left" Name="mylist" VerticalAlignment="Top" Width="278"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <ComboBox Height="23" Width="90" ItemsSource="{Binding Source={StaticResource Enum1}}" SelectedValue="{Binding Path=TheSelectedEnum, Converter={StaticResource enumConverter}}" SelectedIndex="0"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> ``` ![screen](https://i.stack.imgur.com/LN86N.png) (If I expand other comboboxes I see the values) Maybe I can somehow else pass the selected value to the binded object?
ComboBox - bind selected value
CC BY-SA 3.0
null
2011-06-17T12:47:10.707
2011-06-17T18:11:11.990
2011-06-17T17:43:51.123
781,036
781,036
[ "wpf", "binding", "enums" ]
6,386,314
1
6,386,387
null
15
64,016
I have a data frame with columns initially labeled arbitrarily. Later on, I want to change these levels to numerical values. The following script illustrates the problem. ``` library(ggplot2) library(reshape2) m <- 10 n <- 6 nam <- list(c(),letters[1:n]) var <- as.data.frame(matrix(sort(rnorm(m*n)),m,n,F,nam)) dtf <- data.frame(t=seq(m)*0.1, var) mdf <- melt(dtf, id=c('t')) xs <- c(0.25,0.5,1.0,2.0,4.0,8.0) levels(mdf$variable) <- xs g <- ggplot(mdf,aes(variable,value,group=variable,colour=t)) g + geom_point() + #scale_x_continuous() + opts() ``` This plot is produced. ![enter image description here](https://i.stack.imgur.com/OaGft.png) The 'variable' quantities are evenly spaced on the plot, even though numerically this is not true. How can I get the spacing on the x-axis correct?
How do I get discrete factor levels to be treated as continuous?
CC BY-SA 3.0
0
2011-06-17T13:17:51.263
2014-07-18T04:40:34.990
2014-07-18T04:40:34.990
1,290,634
623,007
[ "r", "ggplot2", "dataframe", "r-factor" ]
6,386,894
1
6,386,932
null
8
2,567
Started looking at the win32 API on this site: [http://www.winprog.org/tutorial/start.html](http://www.winprog.org/tutorial/start.html) I've literally just compiled the first example and it's given me a message prompt in chinese/japanese, or something along those lines. Question: Why? Obviously as far as my understanding goes, I should be getting "Goodbye, cruel world!" in a message box (Presumably titled 'Note'). ``` #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK); return 0; } ``` ![Foreign...](https://i.stack.imgur.com/uHo0R.png) Thanks.
Win32 in C - Why does my text show up as a foreign language?
CC BY-SA 3.0
0
2011-06-17T13:57:44.853
2013-09-09T21:25:16.237
2011-06-17T18:54:04.490
310,574
767,912
[ "c", "winapi", "locale" ]
6,386,923
1
6,430,323
null
0
907
Given the following insane setup (a ComboBox inside a UserControl inside a ToolStripControlHost inside a ContextMenuStrip): ![enter image description here](https://i.stack.imgur.com/BB30J.png) there's something odd going on with clicking on different items in the ComboBox popup. If the item is inside the menu bounds (i.e. Amsterdam, Brussel or Luxemburg) the item is selected. If the item is outside the menu bounds (i.e. Berlijn and further) the menu is closed immediately. Ignoring any spiffy remarks regarding the sheer crazy, anyone know what's going on and how to stop the menu from closing if a distant combobox item is selected?
Combobox inside ContextMenuStrip problem
CC BY-SA 3.0
0
2011-06-17T13:59:59.870
2011-06-21T18:39:47.993
null
null
81,947
[ "winforms", "events", "combobox", "contextmenu" ]
6,387,070
1
null
null
1
2,783
![enter image description here](https://i.stack.imgur.com/g08Bv.jpg) I am using UpdatePanel in the ASPX page and I could not get rid of this message however I tried. I could run the page without errors and update panel is working fine. But, I could not solve that error in the VSStudio Design View. I do have web.config file in my website. Could you please help me to solve that? Thanks in advance.
UpdatePanel is not a known element in VSStudio 2010 Design View
CC BY-SA 3.0
null
2011-06-17T14:09:03.193
2011-09-20T09:05:11.653
null
null
296,074
[ "c#", "visual-studio-2010", "updatepanel" ]
6,387,060
1
null
null
0
1,849
Background: I have a bundles listbox that inherits values from the carriers listbox once a carrier is selected via a web service. - - - - - Problem: Using the required field validator on the bundles listbox is returning an a false erorr when I have bundles selected. When I click the Send Button, I get the "Select At Least 1 Bundle" Error Message but the invitation still sends out an i get an email. Here's a screenshot of the application: ![Validation_Listbox_Error](https://i.stack.imgur.com/T1yMJ.jpg) asp.net code on default.aspx page: ``` <tr> <td class="style5"> Carrier:<br /> <font size="1">*Hold Ctrl Key Down to Select Multiple Carriers</font></td> <td bgcolor="#ffffff" class="style7"> <asp:ListBox ID="lbCarriers" SelectionMode="Multiple" AutoPostBack="true" runat="server" Height="86px" Width="250px" ValidationGroup="ValidationGroup"> </asp:ListBox> </td> <td bgcolor="#ffffff" class="style2"> <asp:RequiredFieldValidator ID="CarrierValidator" runat="server" Text="*" ErrorMessage="Select At Least 1 Carrier" ControlToValidate="lbCarriers" ValidationGroup = "ValidationGroup" ForeColor="Red" ></asp:RequiredFieldValidator> </td> </tr> <tr> <td class="style1"> Bundles:<br /> <font size="1">*Hold Ctrl Key Down to Select Multiple Bundles</font></td> <td bgcolor="#ffffff" class="style6"> <asp:ListBox ID="bundles" SelectionMode="Multiple" runat="server" Height="86px" Width="250px" Enabled="True" ValidationGroup="ValidationGroup" CausesValidation="True"> </asp:ListBox> </td> <td bgcolor="#ffffff" class="style2"> <asp:RequiredFieldValidator ID="BundleValidator" runat="server" Text="*" ErrorMessage="Select At Least 1 Bundle" ControlToValidate="bundles" ValidationGroup = "ValidationGroup" ForeColor="Red" ></asp:RequiredFieldValidator> </td> </tr> <asp:Button ID="Send_Button" runat="server" Text="Send Invitation" ValidationGroup="ValidationGroup" Width="123px"/> &nbsp;<br /> <asp:Label ID="Send_Success" runat="server" Text="Invitation sent!" Visible="false"></asp:Label> <br /> <asp:ValidationSummary ID="ValidationSummary" runat="server" ForeColor="Red" ValidationGroup="ValidationGroup" /> ``` Question: What alternate code or work-around do you recommend for this issue? Thanks for looking!
ASP.NET - Required Field Validator giving false negative errors on Listbox
CC BY-SA 3.0
null
2011-06-17T14:08:31.680
2011-06-27T13:15:05.550
2011-06-27T13:15:05.550
606,805
606,805
[ "asp.net", "listbox", "validation", "requiredfieldvalidator" ]
6,387,172
1
null
null
1
1,607
I have a problem in the page whose URL can be seen below: [http://hero.mynet.com/new/](http://hero.mynet.com/new/) There is a tabbed structure at the middle bottom of page.Each tab consists one carousel working.And each carousel item (image) can be shown in an overlay when they are clicked. I used jQuery 1.3.2 (I know it's old but I cannot change because of other depencies), jQuery UI 1.7.3, jCarousel 0.2.8 and FancyBox 1.3.4 to build this. Problem can be seen in the screen shots of Internet Explorer and Chrome when 2nd or 3th tab clicked and prev button clicked. What can caused this, I tried many things to fix this but none of the fixed my problem. What do you recommend? It's difficult to change all structure to a new one because of the time planing of this job. tHanks to all answers already now ![Internet Explorer Screen Shot](https://i.stack.imgur.com/ATzbJ.jpg) ![Chrome Screen Shot](https://i.stack.imgur.com/P5VHt.jpg)
jQuery multiple carousels in jQuery UI tabs do not work properly in Internet Explorer and Chrome
CC BY-SA 3.0
null
2011-06-17T14:16:07.230
2011-12-08T10:19:55.073
2011-06-17T14:19:30.790
182,668
181,691
[ "javascript", "jquery", "jquery-ui", "jquery-ui-tabs", "jcarousel" ]
6,387,214
1
6,387,448
null
2
3,926
I'm trying to fetch the feeds dynamically from some source and then i wanted to display each of the link in form of list in jQuery mobile . I'm able to fetch the feeds but they are displaying normally even tough i had kept `data-role="listview"` and `unorderedlist.listview('refresh')`. ![enter image description here](https://i.stack.imgur.com/T1zou.jpg) Below is the code ``` <!DOCTYPE html> <html> <head> <title>Page Title</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script> <style type="text/css"> .nstyle { data-role:listview; list-style:none; } </style> <script> $(document).ready(function(){ $("#toi").rssfeed("http://timesofindia.feedsportal.com/c/33039/f/533974/index.rss",{limit:5,date:false,header:false,content:false}); }); </script> <script type="text/javascript"> (function($){ var current=null; $.fn.rssfeed=function(url,options){ var defaults={limit:10,header:true,titletag:'h4',date:true,content:true,snippet:true,showerror:true,errormsg:'',key:null}; var options=$.extend(defaults,options); return this.each(function(i,e){var $e=$(e); if(!$e.hasClass('rssFeed'))$e.addClass('rssFeed'); if(url==null)return false; var api="http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q="+url; if(options.limit!=null) api+="&num="+options.limit; if(options.key!=null)api+="&key="+options.key; $.getJSON(api,function(data) {if(data.responseStatus==200) {_callback(e,data.responseData.feed,options); } else{ if(options.showerror) if(options.errormsg!='') { var msg=options.errormsg; }else { var msg=data.responseDetails; }; $(e).html('<div"><p>'+msg+'</p></div>');};});});}; var _callback=function(e,feeds,options){if(!feeds){return false; } var html=''; var row='odd'; if(options.header) html+='<div>'+'<a href="'+feeds.link+'" title="'+feeds.description+'">'+feeds.title+'</a>'+'</div>'; html+='<div>'+'<ul id="tst">'; for(var i=0;i<feeds.entries.length;i++) {var entry=feeds.entries[i]; var entryDate=new Date(entry.publishedDate); var pubDate=entryDate.toLocaleDateString()+' '+entryDate.toLocaleTimeString(); html+='<li class="rssRow '+row+'">'+'<'+options.titletag+'><a href="'+entry.link+'" title="View this feed at '+feeds.title+'">'+entry.title+'</a></'+options.titletag+'>' if(options.date)html+='<div>'+pubDate+'</div>' if(options.content) {if(options.snippet&&entry.contentSnippet!=''){var content=entry.contentSnippet; }else{var content=entry.content; } html+='<p>'+content+'</p>'} html+='</li>';if(row=='odd'){row='even';}else{row='odd';}} html+='</ul>'+'</div>' $(e).html(html); $("#tst").addClass('nstyle'); $("#tst").listview('refresh'); }; })(jQuery); </script> </head> <body> <div data-role="page" id="home" data-theme="e"> <div data-role="header" > <h1>Times Of India</h1> </div> <div data-role="content" id="toi"> content here </div> <div data-role="footer"> <h4>Top News</h4> </div> </div> </body> </html> ```
listview not working in jQuery mobile
CC BY-SA 3.0
0
2011-06-17T14:19:40.690
2012-08-01T06:35:35.473
null
null
413,816
[ "jquery" ]
6,387,342
1
6,389,107
null
6
18,750
I'm using PrimeFaces 3.0 and I want to incorporate the `<p:layout>` into my pages. The layout component in 'fullPage' mode does a nice job of dividing up the page, but I have some issues with the look-and-feel of it. Here is what my test page looks like: ![enter image description here](https://i.stack.imgur.com/7T6Vx.jpg) Look specifically at the bottom/south layout unit. There are two things I want to change. 1. How can I stop it from displaying that layout unit with a border around it? 2. How can I stop it from displaying the scrollbar when the content is too big to fit? I just want it to clip the content. I just purchased the PrimeFaces 2.2 manual (there isn't a 3.0 manual yet), but it doesn't speak to this kind of change. Do I need to perform some CSS styling magic?
PrimeFaces 3.0 - How do I prevent <p:layoutUnit> from displaying border and/or scrollbars?
CC BY-SA 3.0
0
2011-06-17T14:28:12.113
2016-02-01T16:11:04.660
2015-02-23T08:57:13.550
157,882
346,112
[ "jsf", "layout", "jsf-2", "primefaces" ]
6,387,392
1
6,419,990
null
3
4,233
I'm bringing focus to a UITextView after setting its property to NO. When I set the [textView becomeFirstResponder] the textView gets the little typing cursor, but the keyboard remains hidden. Any idea why? If it helps, the main view is a modal view that a UINavigationController is presenting. EDIT: Here's the method that gets called: ``` - (void)show_comment_elements { toolbar.hidden = YES; main_table.hidden = YES; add_comment_table.hidden = NO; comment_text.hidden = NO; [comment_text becomeFirstResponder]; } ``` Here's a screenshot: ![frustration](https://i.stack.imgur.com/V0ECc.png)
Keyboard hidden after becomeFirstResponder
CC BY-SA 3.0
null
2011-06-17T14:33:06.203
2013-06-30T08:52:03.263
2011-06-17T14:44:17.947
345,282
345,282
[ "ios", "cocoa-touch", "uikit", "uitextview", "becomefirstresponder" ]
6,387,438
1
6,410,422
null
5
4,354
I'd like to have the scrollbar place over the content instead of forcing a gutter beside it. In the attached image you can see what it currently does with the red scroll bar...it creates a vertical gutter that pushes the content to the side. But what I want to do is what's on the bottom...have the scrollbar positioned over the content. I've tried absolutely positioning `.jspVerticalBar` but I haven't been able to get rid of the gutter. ![enter image description here](https://i.stack.imgur.com/cUrPN.png) EDIT: Here's the jsFiddle of the problem: [http://jsfiddle.net/8Mebt/3/](http://jsfiddle.net/8Mebt/3/) -- As you can see, there's still a gap on the far right and the "selected" state of the item doesn't extend all the way over as I want it to.
jScrollPane: Remove scrollbar gutter?
CC BY-SA 3.0
0
2011-06-17T14:36:18.713
2013-05-07T09:11:29.550
2011-06-20T11:53:51.517
147,586
147,586
[ "javascript", "jquery", "jscrollpane", "jquery-jscrollpane" ]
6,387,628
1
6,388,086
null
1
2,421
I have the following table below and am supposed to convert it to 2NF. ![Convert table to 2NF](https://i.stack.imgur.com/skzRH.png) I have an answer to this where I have gone: > SKILLS: Employee, SkillLOCATION: Employee, Current Work Location I have a feeling I'm wrong with this ^above^ though. Also can someone explain what the differences are between 1NF, 2NF and 3NF. I know 1 comes first and you have to break it all up into smaller tables but would like a really good description to help me understand better. Thanks
Convert table to 2NF - strange table to convert?
CC BY-SA 3.0
null
2011-06-17T14:52:02.577
2015-02-08T07:21:47.080
2014-02-20T05:29:51.890
1,190,388
733,809
[ "database", "database-design", "database-normalization", "database-table" ]
6,388,109
1
6,388,221
null
2
1,297
I know that it might stupid but . I do not mean any output, but especially in the form inputs. Like for example if I have input tag and put the user text in the value. ``` <input type="text" value="'test' "test" <script>alert('hacked');</script>" /> ``` When I leave it like that it appears correctly ``` 'test' "test" <script>alert('hacked');</script> ``` no XSS happens, but I do not feel secure cause with other code it could break eventually. Is there something like a browser build-in methods for preventing XSS when putting data in the form or I am missing something? Edit: I did not say the entire story. Sorry about that. When I use `htmlentities` or `htmlspecialchars` I get the escaped data which I do not want. I see this in the input, which is not what was entered :( ``` 'test' &quot;test&quot; &lt;script&gt;alert('hacked');&lt;/script&gt; ``` I want to prevent XSS and to show the content without changing it at the same time. Is it possible in this case.![enter image description here](https://i.stack.imgur.com/9SglB.jpg)
How to escape insecure content in form in order to prevent XSS?
CC BY-SA 3.0
0
2011-06-17T15:29:23.297
2011-06-20T09:26:28.257
2011-06-17T15:57:15.827
432,057
432,057
[ "php", "html", "forms", "escaping", "xss" ]
6,388,181
1
6,388,278
null
1
1,311
Maybe you can help point me in the right direction on this. In our app, I am periodically noticing that a particular event handler is not firing. 99% of the time, it works fine, but, every so often, it just dies. How can I find out whats happening? Is the DispatchEvent() not happening/working somehow? Is my listener still listening? Did something else catch the event, and not pass it along so that the 'right' listener can get to it ? Here's a little bit of the code... ![code](https://i.stack.imgur.com/w13OJ.png) Thats a somewhat pruned down version of what the real code is, but I don't think I trimmed out anything important. The key, as I see it is that we fire up the params dialog, then start to listen for the closed event. Then, we show the param dialogs close function. What happens when it fails is that the trace message "caught close event.." is never generated, and, consequently, the closeHandler is not getting called at all. I don't see anything out of place there, do you? So, what tools are at my disposal to track this little bugger down? Thanks!
Flex Event Listener Callback Not Firing
CC BY-SA 3.0
null
2011-06-17T15:35:21.733
2011-06-17T16:28:58.510
null
null
216,160
[ "apache-flex", "events", "flex4", "callback" ]
6,388,381
1
null
null
17
2,537
The client asked me to give them some dropdowns. So I gave them some, populated with lots of different options. They liked the way the dropdowns looked in Firefox and Chrome, because the dropdown would automatically expand for to the width of the text, as depicted: ![enter image description here](https://i.stack.imgur.com/YhwUT.png) But this isn't the case with IE Internet Explorer is the goth-teen of the web development world and likes to behave differently so it's not seen by its peers as a , it seems. It doesn't see the value in expanding a dropdown to enable the user to read all of the text it contains. So it looks like this: ![enter image description here](https://i.stack.imgur.com/TYFLj.png) This wasn't good enough for the client, so they asked me to fix it. I found a jQuery plugin that would resize the text box when you gave it focus so that when it opened you could see all the text in it. An example is available here: (be sure to load this in IE8 or less) [http://jsfiddle.net/tmcNP/3/](http://jsfiddle.net/tmcNP/3/) Notice how when you click on the `All companies` dropdown, it forces the dropdown onto the next line? Is there any way I can get it to stay on the same line, and 'overflow'* out of the containing div? *not sure if this is the correct term, in this context.
How to get <select> box to overflow out of the containing <div>?
CC BY-SA 3.0
0
2011-06-17T15:52:56.490
2011-06-18T05:25:55.647
null
null
181,771
[ "javascript", "jquery", "html", "css" ]
6,388,531
1
6,388,562
null
7
32,961
I am just testing some code at the moment, although when calling the StartRemoveDuplicate (when its compiled) an Exception is thrown, complaining about illegal characters: ![error](https://i.stack.imgur.com/ACPyq.png) My code is as follows: ``` class Program { static void Main(string[] args) { foreach (string exename in System.IO.File.ReadAllLines("test.txt")) { Process.Start("test.exe", "\"" + exename + "\"").WaitForExit(); } StartRemoveDuplicate(); } private static void RemoveDuplicate(string sourceFilePath, string destinationFilePath) { var readLines = File.ReadAllLines(sourceFilePath, Encoding.Default); File.WriteAllLines(destinationFilePath, readLines.Distinct().ToArray(), Encoding.Default); } private static void StartRemoveDuplicate() { RemoveDuplicate("C:\test.txt", "C:\test2.txt"); } } ```
C# - Unhandled Exception - Illegal Characters in Path
CC BY-SA 3.0
null
2011-06-17T16:06:32.590
2011-06-17T16:10:34.500
2011-06-17T16:09:28.317
74,022
803,566
[ "c#", ".net", "windows" ]