PostId
int64 13
11.8M
| PostCreationDate
stringlengths 19
19
| OwnerUserId
int64 3
1.57M
| OwnerCreationDate
stringlengths 10
19
| ReputationAtPostCreation
int64 -33
210k
| OwnerUndeletedAnswerCountAtPostTime
int64 0
5.77k
| Title
stringlengths 10
250
| BodyMarkdown
stringlengths 12
30k
| Tag1
stringlengths 1
25
⌀ | Tag2
stringlengths 1
25
⌀ | Tag3
stringlengths 1
25
⌀ | Tag4
stringlengths 1
25
⌀ | Tag5
stringlengths 1
25
⌀ | PostClosedDate
stringlengths 19
19
⌀ | OpenStatus
stringclasses 5
values | unified_texts
stringlengths 47
30.1k
| OpenStatus_id
int64 0
4
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,321,808 | 07/04/2012 02:50:14 | 1,500,294 | 07/04/2012 01:27:25 | 1 | 0 | Solution for Windows build-in codec could not decode high resolution MJPEG capture video | Use Directshow sample, amcap, to preview UVC cam which support high resolution of 2592x1944 pixels, but the windows build-in could not decode the capture data. Any solution for that? | windows | codec | mjpeg | decoder | null | null | open | Solution for Windows build-in codec could not decode high resolution MJPEG capture video
===
Use Directshow sample, amcap, to preview UVC cam which support high resolution of 2592x1944 pixels, but the windows build-in could not decode the capture data. Any solution for that? | 0 |
7,779,035 | 10/15/2011 16:19:36 | 997,015 | 10/15/2011 16:02:59 | 1 | 0 | DataBinding from entityEFramework to Listivew dataSource | My entity is returning the following:
class StoreClass{
public Applet GetStoreInfo(int id, UserInfo userInfo)
{
using (var context = new StoreEntities())
{
var query = from a in context.Store
.Include("tRatings")
.Include("Versions")
.Include("Versions.Installers")
.Include("Versions.Installers.Screenshots")
.Include("Category")
where a.ID == id && a.IsActive
select a;
return query.FirstOrDefault();
}
}
}
I am trying to bind the data data returned form the above function to the listview.
StoreClass objStore = new StoreClass ();
Listview1.DataSource = objStore .GetStoreInfo(1,userInfo);
LstAppletInfo.DataBind();
}
But its throwing an error "Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource."
Help me solve this!!!
| asp.net | entity-framework | listview | null | null | null | open | DataBinding from entityEFramework to Listivew dataSource
===
My entity is returning the following:
class StoreClass{
public Applet GetStoreInfo(int id, UserInfo userInfo)
{
using (var context = new StoreEntities())
{
var query = from a in context.Store
.Include("tRatings")
.Include("Versions")
.Include("Versions.Installers")
.Include("Versions.Installers.Screenshots")
.Include("Category")
where a.ID == id && a.IsActive
select a;
return query.FirstOrDefault();
}
}
}
I am trying to bind the data data returned form the above function to the listview.
StoreClass objStore = new StoreClass ();
Listview1.DataSource = objStore .GetStoreInfo(1,userInfo);
LstAppletInfo.DataBind();
}
But its throwing an error "Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource."
Help me solve this!!!
| 0 |
7,753,271 | 10/13/2011 11:14:49 | 610,159 | 02/09/2011 17:34:01 | 387 | 14 | Ruby vs Scala - pros and contras of each one | What benefits and limitations has [Scala][1] language comparing to [Ruby][2], especially from the web applications developer point of view?
P. S. This is not a holy war question (-:
[1]: http://scala-lang.org
[2]: http://ruby-lang.org | ruby | scala | comparison | null | null | 10/13/2011 11:49:22 | not constructive | Ruby vs Scala - pros and contras of each one
===
What benefits and limitations has [Scala][1] language comparing to [Ruby][2], especially from the web applications developer point of view?
P. S. This is not a holy war question (-:
[1]: http://scala-lang.org
[2]: http://ruby-lang.org | 4 |
8,436,082 | 12/08/2011 18:51:44 | 1,088,346 | 12/08/2011 18:39:42 | 1 | 0 | Caused by: java.lang.ClassNotFoundException | I having some problem to Run my application. I follow the instruction from http://www.vogella.de/articles/AndroidLocationAPI/article.html#sourcecode
And this was the Error that i get when compiling :
Caused by: java.lang.ClassNotFoundException: de.vogella.android.locationapi.maps.ShowMap in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/de.vogella.android.locationapi.maps-2.apk]
Below is my Coding:
For ShowLocation.java
import android.content.Context
import android.location.Location
import android.location.LocationListener
import android.location.LocationManager
import android.os.Bundle
import com.google.android.maps.GeoPoint
import com.google.android.maps.MapActivity
import com.google.android.maps.MapController
import com.google.android.maps.MapView
import de.vogella.android.locationapi.maps.R
public class ShowLocation extends MapActivity {
private MapController mapController;
private MapView mapView;
private LocationManager locationManager;
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.main); // bind the layout to the activity
// create a map view
//RelativeLayout linearLayout = (RelativeLayout) findViewById(R.id.mainlayout);
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mapView.setStreetView(true);
mapController = mapView.getController();
mapController.setZoom(14); // Zoon 1 is world view
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,
0, new GeoUpdateHandler());
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
public class GeoUpdateHandler implements LocationListener {
@Override
public void onLocationChanged(Location location) {
int lat = (int) (location.getLatitude() * 1E6);
int lng = (int) (location.getLongitude() * 1E6);
GeoPoint point = new GeoPoint(lat, lng);
mapController.animateTo(point); // mapController.setCenter(point);
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
}
}
And when i trying to compiling i get these error:
12-09 02:42:06.976: D/AndroidRuntime(12199): Shutting down VM
12-09 02:42:06.976: W/dalvikvm(12199): threadid=1: thread exiting with uncaught exception (group=0x40015560)
12-09 02:42:07.106: E/AndroidRuntime(12199): FATAL EXCEPTION: main
12-09 02:42:07.106: E/AndroidRuntime(12199): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.vogella.android.locationapi.maps/de.vogella.android.locationapi.maps.ShowMap}: java.lang.ClassNotFoundException: de.vogella.android.locationapi.maps.ShowMap in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/de.vogella.android.locationapi.maps-2.apk]
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.os.Handler.dispatchMessage(Handler.java:99)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.os.Looper.loop(Looper.java:130)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.main(ActivityThread.java:3683)
12-09 02:42:07.106: E/AndroidRuntime(12199): at java.lang.reflect.Method.invokeNative(Native Method)
12-09 02:42:07.106: E/AndroidRuntime(12199): at java.lang.reflect.Method.invoke(Method.java:507)
12-09 02:42:07.106: E/AndroidRuntime(12199): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:861)
12-09 02:42:07.106: E/AndroidRuntime(12199): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
12-09 02:42:07.106: E/AndroidRuntime(12199): at dalvik.system.NativeStart.main(Native Method)
12-09 02:42:07.106: E/AndroidRuntime(12199): Caused by: java.lang.ClassNotFoundException: de.vogella.android.locationapi.maps.ShowMap in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/de.vogella.android.locationapi.maps-2.apk]
12-09 02:42:07.106: E/AndroidRuntime(12199): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
12-09 02:42:07.106: E/AndroidRuntime(12199): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
12-09 02:42:07.106: E/AndroidRuntime(12199): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
12-09 02:42:07.106: E/AndroidRuntime(12199): ... 11 more
| android | null | null | null | null | 12/09/2011 04:34:56 | too localized | Caused by: java.lang.ClassNotFoundException
===
I having some problem to Run my application. I follow the instruction from http://www.vogella.de/articles/AndroidLocationAPI/article.html#sourcecode
And this was the Error that i get when compiling :
Caused by: java.lang.ClassNotFoundException: de.vogella.android.locationapi.maps.ShowMap in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/de.vogella.android.locationapi.maps-2.apk]
Below is my Coding:
For ShowLocation.java
import android.content.Context
import android.location.Location
import android.location.LocationListener
import android.location.LocationManager
import android.os.Bundle
import com.google.android.maps.GeoPoint
import com.google.android.maps.MapActivity
import com.google.android.maps.MapController
import com.google.android.maps.MapView
import de.vogella.android.locationapi.maps.R
public class ShowLocation extends MapActivity {
private MapController mapController;
private MapView mapView;
private LocationManager locationManager;
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.main); // bind the layout to the activity
// create a map view
//RelativeLayout linearLayout = (RelativeLayout) findViewById(R.id.mainlayout);
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mapView.setStreetView(true);
mapController = mapView.getController();
mapController.setZoom(14); // Zoon 1 is world view
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,
0, new GeoUpdateHandler());
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
public class GeoUpdateHandler implements LocationListener {
@Override
public void onLocationChanged(Location location) {
int lat = (int) (location.getLatitude() * 1E6);
int lng = (int) (location.getLongitude() * 1E6);
GeoPoint point = new GeoPoint(lat, lng);
mapController.animateTo(point); // mapController.setCenter(point);
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
}
}
And when i trying to compiling i get these error:
12-09 02:42:06.976: D/AndroidRuntime(12199): Shutting down VM
12-09 02:42:06.976: W/dalvikvm(12199): threadid=1: thread exiting with uncaught exception (group=0x40015560)
12-09 02:42:07.106: E/AndroidRuntime(12199): FATAL EXCEPTION: main
12-09 02:42:07.106: E/AndroidRuntime(12199): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.vogella.android.locationapi.maps/de.vogella.android.locationapi.maps.ShowMap}: java.lang.ClassNotFoundException: de.vogella.android.locationapi.maps.ShowMap in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/de.vogella.android.locationapi.maps-2.apk]
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.os.Handler.dispatchMessage(Handler.java:99)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.os.Looper.loop(Looper.java:130)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.main(ActivityThread.java:3683)
12-09 02:42:07.106: E/AndroidRuntime(12199): at java.lang.reflect.Method.invokeNative(Native Method)
12-09 02:42:07.106: E/AndroidRuntime(12199): at java.lang.reflect.Method.invoke(Method.java:507)
12-09 02:42:07.106: E/AndroidRuntime(12199): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:861)
12-09 02:42:07.106: E/AndroidRuntime(12199): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
12-09 02:42:07.106: E/AndroidRuntime(12199): at dalvik.system.NativeStart.main(Native Method)
12-09 02:42:07.106: E/AndroidRuntime(12199): Caused by: java.lang.ClassNotFoundException: de.vogella.android.locationapi.maps.ShowMap in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/de.vogella.android.locationapi.maps-2.apk]
12-09 02:42:07.106: E/AndroidRuntime(12199): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
12-09 02:42:07.106: E/AndroidRuntime(12199): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
12-09 02:42:07.106: E/AndroidRuntime(12199): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
12-09 02:42:07.106: E/AndroidRuntime(12199): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
12-09 02:42:07.106: E/AndroidRuntime(12199): ... 11 more
| 3 |
3,679,994 | 09/09/2010 19:40:42 | 443,783 | 09/09/2010 19:40:42 | 1 | 0 | getopt - parameters that aren't flags? | I'm trying to use the getopt function for the first time only I'm having problems with arguments that aren't flags. For instance, in my code when a unknown argument is given I want to use it as a input file. When I run this with only a file name it is not printed, if I first use a flag, any flag, then I can print it.
How can I fix this?
Thanks
#include <stdio.h>
#include <getopt.h>
static struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"input", required_argument, 0, 'i'},
{"output", required_argument, 0, 'o'},
{"algorithm", required_argument, 0, 'a'},
{0, 0, 0, 0}
};
int main(int argc, char *argv[]) {
int c;
int option_index = 0;
while(42) {
c = getopt_long(argc, argv, "hi:o:a:", long_options,
&option_index);
if(c == -1)
break;
switch(c) {
case 'h': /* --help */
printf("--help flag\n");
break;
case 'i': /* --input */
printf("--input flag\n");
break;
case 'o': /* --output */
printf("--output flag\n");
break;
case 'a': /* --algorithm */
printf("--algorithm flag \n");
break;
default: /* ??? */
fprintf(stderr, "Invalid option");
return 1;
}
if(optind < argc) {
printf("other arguments: ");
while(optind < argc) {
printf ("%s ", argv[optind]);
optind++;
}
printf("\n");
}
}
return 0;
}
| c | command-line-arguments | getopt | null | null | null | open | getopt - parameters that aren't flags?
===
I'm trying to use the getopt function for the first time only I'm having problems with arguments that aren't flags. For instance, in my code when a unknown argument is given I want to use it as a input file. When I run this with only a file name it is not printed, if I first use a flag, any flag, then I can print it.
How can I fix this?
Thanks
#include <stdio.h>
#include <getopt.h>
static struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"input", required_argument, 0, 'i'},
{"output", required_argument, 0, 'o'},
{"algorithm", required_argument, 0, 'a'},
{0, 0, 0, 0}
};
int main(int argc, char *argv[]) {
int c;
int option_index = 0;
while(42) {
c = getopt_long(argc, argv, "hi:o:a:", long_options,
&option_index);
if(c == -1)
break;
switch(c) {
case 'h': /* --help */
printf("--help flag\n");
break;
case 'i': /* --input */
printf("--input flag\n");
break;
case 'o': /* --output */
printf("--output flag\n");
break;
case 'a': /* --algorithm */
printf("--algorithm flag \n");
break;
default: /* ??? */
fprintf(stderr, "Invalid option");
return 1;
}
if(optind < argc) {
printf("other arguments: ");
while(optind < argc) {
printf ("%s ", argv[optind]);
optind++;
}
printf("\n");
}
}
return 0;
}
| 0 |
11,712,121 | 07/29/2012 19:10:03 | 1,339,386 | 04/17/2012 17:26:42 | 11 | 3 | Adobe Flex 4.6 Callout and SQLite | does anyone have an example of how to code a Adobe Flex 4.6 Callout where the values come from a SQLite table?
I am not having any luck finding a working sample | sqlite | adobe | flash-builder | null | null | 07/31/2012 19:06:49 | not constructive | Adobe Flex 4.6 Callout and SQLite
===
does anyone have an example of how to code a Adobe Flex 4.6 Callout where the values come from a SQLite table?
I am not having any luck finding a working sample | 4 |
9,115,400 | 02/02/2012 15:54:12 | 1,185,521 | 02/02/2012 15:46:26 | 1 | 0 | Cannot run Hello Android program | my question is that after writing the code for the Hello Android given by http://developer.android.com/resources/tutorials/hello-world.html
when i Run the code i get the following error -
[2012-02-02 21:15:48 - HelloAndroid] Could not find HelloAndroid.apk!
what could be the problem? Im a newbie to Android so please help! | android | null | null | null | null | 02/03/2012 15:41:08 | not a real question | Cannot run Hello Android program
===
my question is that after writing the code for the Hello Android given by http://developer.android.com/resources/tutorials/hello-world.html
when i Run the code i get the following error -
[2012-02-02 21:15:48 - HelloAndroid] Could not find HelloAndroid.apk!
what could be the problem? Im a newbie to Android so please help! | 1 |
11,274,974 | 06/30/2012 14:43:18 | 1,232,138 | 02/25/2012 05:33:00 | 302 | 4 | .net develpement C++ or C# | I want to learn .net for which I started learning C#. But I am finding it quite inconvenient as I have to unlearn certain things that I learned in C++ and which appear more logical than their corresponding implementation in C#. So I just wanted to ask if there is any point\benefit in learning C# for .net (especially from jobs perspective) or can I do it through C++\VC++?? | c# | .net | null | null | null | 06/30/2012 14:52:10 | not constructive | .net develpement C++ or C#
===
I want to learn .net for which I started learning C#. But I am finding it quite inconvenient as I have to unlearn certain things that I learned in C++ and which appear more logical than their corresponding implementation in C#. So I just wanted to ask if there is any point\benefit in learning C# for .net (especially from jobs perspective) or can I do it through C++\VC++?? | 4 |
9,942,163 | 03/30/2012 11:35:35 | 1,302,974 | 03/30/2012 10:04:46 | 6 | 0 | How to mock DateTime.Now in unit tests? | The normal solution is to hide it behind interface.
public class RecordService
{
`private readonly ISystemTime systemTime;`
public RecordService(ISystemTime systemTime)
{
this.systemTime = systemTime;
}
public void RouteRecord(Record record)
{
if (record.Created <
systemTime.CurrentTime().AddMonths(-2))
{
// process old record
}
// process the record
}
}
In the unit test you can use mock object and decide what to return
[TestClass]
`public class When_old_record_is_processed`
`{`
`[TestMethod]`
`public void Then_it_is_moved_into_old_records_folder()`
`{`
`var systemTime = A.Fake<ISystemTime>(); `
`A.CallTo( () => system.Time.CurrentTime())`
`.Returns(DateTime.Now.AddYears(-1));`
var record = new Record(DateTime.Now);
var service = new RecordService(systemTime);
service.RouteRecord(record);
// Asserts...
}
`}`
I don’t like to inject another interface into my class just to get the current time. It feels too heavy solution for a such a small problem. The solution is to use static class with public function.
public static class SystemTime
{
`public static Func<DateTime> Now = () => DateTime.Now;`
`}`
Now we can remove the ISystemTime injection and RecordService looks like this
public class RecordService
`{`
`public void RouteRecord(Record record)`
`{`
`if (record.Created < SystemTime.Now.AddMonths(-2))`
`{`
`// process old record`
`}`
// process the record
}
}
In the unit tests we can mock the system time just as easily.
[TestClass]
`public class When_old_record_is_processed`
`{`
` [TestMethod]`
`public void Then_it_is_moved_into_old_records_folder()`
`{`
`SystemTime.Now = () => DateTime.Now.AddYears(-1); `
`var record = new Record(DateTime.Now);`
`var service = new RecordService();`
service.RouteRecord(record);
// Asserts...
}
}
Of course there is a downside to all this. You are using public fields (The HORROR!) so nobody is stopping you writing code like this.
public class RecordService
`{`
`public void RouteRecord(Record record)`
`{`
`SystemTime.Now = () => DateTime.Now.AddYears(10);`
`}`
`}`
Also I think it is better to educate developers than create abstractions just to protect them from doing any mistakes. Other possible issues are related to running the tests. If you forget to restore the function back to it's original state it might affect other tests. This depends on the way unit test runner executes the tests.
You can use the same logic to mock file system operations
public static class FileSystem
`{`
` public static Action<string, string> MoveFile = File.Move;`
`}`
In my opinion implementing this kind of functionality (mocking time, simple file system operations) using public functions is perfectly acceptable. It makes the code easier to read, decreases the dependencies and it is easy to mock in the unit tests. | c# | unit-testing | mocking | null | null | 04/02/2012 01:40:53 | not a real question | How to mock DateTime.Now in unit tests?
===
The normal solution is to hide it behind interface.
public class RecordService
{
`private readonly ISystemTime systemTime;`
public RecordService(ISystemTime systemTime)
{
this.systemTime = systemTime;
}
public void RouteRecord(Record record)
{
if (record.Created <
systemTime.CurrentTime().AddMonths(-2))
{
// process old record
}
// process the record
}
}
In the unit test you can use mock object and decide what to return
[TestClass]
`public class When_old_record_is_processed`
`{`
`[TestMethod]`
`public void Then_it_is_moved_into_old_records_folder()`
`{`
`var systemTime = A.Fake<ISystemTime>(); `
`A.CallTo( () => system.Time.CurrentTime())`
`.Returns(DateTime.Now.AddYears(-1));`
var record = new Record(DateTime.Now);
var service = new RecordService(systemTime);
service.RouteRecord(record);
// Asserts...
}
`}`
I don’t like to inject another interface into my class just to get the current time. It feels too heavy solution for a such a small problem. The solution is to use static class with public function.
public static class SystemTime
{
`public static Func<DateTime> Now = () => DateTime.Now;`
`}`
Now we can remove the ISystemTime injection and RecordService looks like this
public class RecordService
`{`
`public void RouteRecord(Record record)`
`{`
`if (record.Created < SystemTime.Now.AddMonths(-2))`
`{`
`// process old record`
`}`
// process the record
}
}
In the unit tests we can mock the system time just as easily.
[TestClass]
`public class When_old_record_is_processed`
`{`
` [TestMethod]`
`public void Then_it_is_moved_into_old_records_folder()`
`{`
`SystemTime.Now = () => DateTime.Now.AddYears(-1); `
`var record = new Record(DateTime.Now);`
`var service = new RecordService();`
service.RouteRecord(record);
// Asserts...
}
}
Of course there is a downside to all this. You are using public fields (The HORROR!) so nobody is stopping you writing code like this.
public class RecordService
`{`
`public void RouteRecord(Record record)`
`{`
`SystemTime.Now = () => DateTime.Now.AddYears(10);`
`}`
`}`
Also I think it is better to educate developers than create abstractions just to protect them from doing any mistakes. Other possible issues are related to running the tests. If you forget to restore the function back to it's original state it might affect other tests. This depends on the way unit test runner executes the tests.
You can use the same logic to mock file system operations
public static class FileSystem
`{`
` public static Action<string, string> MoveFile = File.Move;`
`}`
In my opinion implementing this kind of functionality (mocking time, simple file system operations) using public functions is perfectly acceptable. It makes the code easier to read, decreases the dependencies and it is easy to mock in the unit tests. | 1 |
980,492 | 06/11/2009 11:01:54 | 51,332 | 01/04/2009 07:10:42 | 1,091 | 72 | [C++] What is metaprogramming? | With reference to [this question][1], could anybody please explain and post example code of metaprogramming? I googled the term up, but I found no examples to convince me that it can be of any practical use.
On the same note, is [Qt's Meta Object System][2] a form of metaprogramming?
jrh
[1]: http://stackoverflow.com/questions/980206/c-when-why-if-ever-should-i-think-about-doing-generic-programming-meta-pr
[2]: http://doc.trolltech.com/4.2/metaobjects.html | c+++ | metaprogramming | qt | null | null | null | open | [C++] What is metaprogramming?
===
With reference to [this question][1], could anybody please explain and post example code of metaprogramming? I googled the term up, but I found no examples to convince me that it can be of any practical use.
On the same note, is [Qt's Meta Object System][2] a form of metaprogramming?
jrh
[1]: http://stackoverflow.com/questions/980206/c-when-why-if-ever-should-i-think-about-doing-generic-programming-meta-pr
[2]: http://doc.trolltech.com/4.2/metaobjects.html | 0 |
4,844,669 | 01/30/2011 18:28:46 | 581,206 | 01/19/2011 09:56:13 | 21 | 2 | why there are no multimethods in c++? | I read many article about how to implement multimethod in c++:
1. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1529.html
2. http://www.codeproject.com/KB/recipes/mmcppfcs.aspx
3. http://lambda-the-ultimate.org/node/2590
4. http://parasol.tamu.edu/people/peterp/omm/
why there are no multimethod in c++?
why do not they get supported by c++ standard? | c++ | multimethod | null | null | null | 01/31/2011 14:40:33 | not a real question | why there are no multimethods in c++?
===
I read many article about how to implement multimethod in c++:
1. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1529.html
2. http://www.codeproject.com/KB/recipes/mmcppfcs.aspx
3. http://lambda-the-ultimate.org/node/2590
4. http://parasol.tamu.edu/people/peterp/omm/
why there are no multimethod in c++?
why do not they get supported by c++ standard? | 1 |
923,135 | 05/28/2009 20:53:56 | 93,461 | 04/20/2009 22:39:05 | 124 | 3 | does custom user class break applications in django? | Let's say that I have subclassed User model (CustomUser) properly (as explained here: [http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/][1])
and installed the comments app.
to access the user of a comment in the template I write:
{{comment.user}} # which provides User, not my CustomUser
and therefore,
{{comment.user.CustomProperty}} #does not work.
How can I work around it?
[1]: http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/ | django | django-models | authentication | null | null | null | open | does custom user class break applications in django?
===
Let's say that I have subclassed User model (CustomUser) properly (as explained here: [http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/][1])
and installed the comments app.
to access the user of a comment in the template I write:
{{comment.user}} # which provides User, not my CustomUser
and therefore,
{{comment.user.CustomProperty}} #does not work.
How can I work around it?
[1]: http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/ | 0 |
4,500,953 | 12/21/2010 15:35:20 | 4,144 | 09/02/2008 02:27:42 | 1,167 | 25 | Non Ruby dependent HAML and SASS | Forgive my ignorance about these two technologies, as I just learned of them this morning. Read about them and look like something I would like to use, however I am not a Ruby developer.
Is there a non-Ruby equivalent to SASS and/or HAML?
Or maybe I'm asking the wrong question entirely, but basically I would like to use these in my C# project. | haml | sass | null | null | null | 07/22/2012 22:00:55 | not a real question | Non Ruby dependent HAML and SASS
===
Forgive my ignorance about these two technologies, as I just learned of them this morning. Read about them and look like something I would like to use, however I am not a Ruby developer.
Is there a non-Ruby equivalent to SASS and/or HAML?
Or maybe I'm asking the wrong question entirely, but basically I would like to use these in my C# project. | 1 |
10,598,315 | 05/15/2012 09:58:40 | 593,627 | 01/28/2011 10:20:04 | 12,567 | 423 | Why is casting named as such? | Where did the term `casting` / `type-casting` (as used in OOP) come from?
Is there some meaning of `"to cast <noun>"` that makes it a good choice?
Specifically, is there some resource that indicates when the term was coined (and why)?
----------
<sup>I've googled around and haven't found an answer.</sup> | oop | language-agnostic | casting | keywords | null | 05/15/2012 11:10:47 | off topic | Why is casting named as such?
===
Where did the term `casting` / `type-casting` (as used in OOP) come from?
Is there some meaning of `"to cast <noun>"` that makes it a good choice?
Specifically, is there some resource that indicates when the term was coined (and why)?
----------
<sup>I've googled around and haven't found an answer.</sup> | 2 |
9,122,914 | 02/03/2012 02:22:22 | 1,038,204 | 11/09/2011 17:42:13 | 1 | 0 | Download a file using curl from a php server | I'm trying to write a script that will download all the source material from the tutorials at lazyfoo.net. An example download link for the file is
http://lazyfoo.net/downloads/index.php?file=SDLTut_lesson16
I use this command:
`curl http://lazyfoo.net/downloads/index.php?file=SDLTut_lesson13 --O lesson13.zip`
This gets me this response and no file:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Am I missing something obvious?
| curl | null | null | null | null | 02/05/2012 07:41:43 | off topic | Download a file using curl from a php server
===
I'm trying to write a script that will download all the source material from the tutorials at lazyfoo.net. An example download link for the file is
http://lazyfoo.net/downloads/index.php?file=SDLTut_lesson16
I use this command:
`curl http://lazyfoo.net/downloads/index.php?file=SDLTut_lesson13 --O lesson13.zip`
This gets me this response and no file:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Am I missing something obvious?
| 2 |
5,878,782 | 05/04/2011 04:59:28 | 195,347 | 10/23/2009 14:19:39 | 3,184 | 178 | How to codesign automatically generated iOS apps? | Greetings,
I'm in the progress of writing a web server script that lets you create custom iOS apps (basically exchanging logos and a few other things). The web server customizes a previously uploaded "shell" .ipa and re-zips the whole container to send it to the user's browser. That is: we customize a previously uploaded .ipa on the web server and let the user download it for submission to the App Store.
The next step would be to re-codesign the whole .ipa - because we changed the .IPA contents and the user must use his own signing identity - so that he can actually upload it to the App Store.
From what I understand, there is a "CodeResources" file which contains some kind of hash for each resource file in the bundle, and the executable contains some kind of embedded signature as well. To generate these, you'd have to use the "codesign" utility on the user's computer, then use Application Loader to submit it to the App Store. Correct so far?
What I'm trying to find out is:
1. Is there a way to codesign the .ipa on the server (with having the user upload his certificate beforehand), so that he does not have any extra work to do?
2. If 1) is not possible, is there some kind of tool that allows to re-codesign the .ipa without much hassle? Xcode seems to require some project setup work to do just a bit of code signing - if possible at all.
3. Are there any alternative ways to codesign the .ipa files for the user - possibly without having to manually do it by hand?
Thanks in advance!
| iphone | xcode | ios | code-signing | application-loader | null | open | How to codesign automatically generated iOS apps?
===
Greetings,
I'm in the progress of writing a web server script that lets you create custom iOS apps (basically exchanging logos and a few other things). The web server customizes a previously uploaded "shell" .ipa and re-zips the whole container to send it to the user's browser. That is: we customize a previously uploaded .ipa on the web server and let the user download it for submission to the App Store.
The next step would be to re-codesign the whole .ipa - because we changed the .IPA contents and the user must use his own signing identity - so that he can actually upload it to the App Store.
From what I understand, there is a "CodeResources" file which contains some kind of hash for each resource file in the bundle, and the executable contains some kind of embedded signature as well. To generate these, you'd have to use the "codesign" utility on the user's computer, then use Application Loader to submit it to the App Store. Correct so far?
What I'm trying to find out is:
1. Is there a way to codesign the .ipa on the server (with having the user upload his certificate beforehand), so that he does not have any extra work to do?
2. If 1) is not possible, is there some kind of tool that allows to re-codesign the .ipa without much hassle? Xcode seems to require some project setup work to do just a bit of code signing - if possible at all.
3. Are there any alternative ways to codesign the .ipa files for the user - possibly without having to manually do it by hand?
Thanks in advance!
| 0 |
10,084,935 | 04/10/2012 07:40:31 | 1,268,208 | 03/14/2012 06:04:53 | 6 | 0 | How to create new console in separate view | I have created new console using follwing code.
this.console = new IOConsole(name, null);
IConsole[] consoles = new IConsole[1];
consoles[0] = this.console ;
ConsolePlugin.getDefault().getConsoleManager()
.addConsoles(consoles);
IOConsoleOutputStream consoleStream = this.console.newOutputStream();
consoleStream.write("Printing in console..");
I have created 3 new consoles same as above.
But actually I don't want to add one of my new consoles page to existing consoles.
I want to create new console view, that should display these console messages.
How can I get separate console view rather to add existing console manager.
Because I want to detach one of my own console views, not other consoles.
<br>Is it possible to create new view and attach one console to that view.
Could any one help me to get this.
Thanks in advance. | java | eclipse-plugin | null | null | null | null | open | How to create new console in separate view
===
I have created new console using follwing code.
this.console = new IOConsole(name, null);
IConsole[] consoles = new IConsole[1];
consoles[0] = this.console ;
ConsolePlugin.getDefault().getConsoleManager()
.addConsoles(consoles);
IOConsoleOutputStream consoleStream = this.console.newOutputStream();
consoleStream.write("Printing in console..");
I have created 3 new consoles same as above.
But actually I don't want to add one of my new consoles page to existing consoles.
I want to create new console view, that should display these console messages.
How can I get separate console view rather to add existing console manager.
Because I want to detach one of my own console views, not other consoles.
<br>Is it possible to create new view and attach one console to that view.
Could any one help me to get this.
Thanks in advance. | 0 |
6,988,706 | 08/08/2011 21:15:48 | 855,834 | 07/21/2011 11:45:50 | 1 | 0 | Arduino low hertz communication | <br><br>
I'm thinking about having two arduino's(nano) communicating with eachother, but I'm not 100% sure how. So I was thinking about the ways that are possible:
- Radio
- Visible Light
- Sound
- Wi-Fi
- 3G
And I believe that the best solution would be sound, low hertz like below the spectrum which animals / humans can hear.
Why do I believe that sound would be easiest?
<br>Because it can bounce on walls and mostly anything to get to a reciever and because it's the easiest way and most likely cheapest way to do it.
The question is: where do I find / how do I make such a device that can send and read low hertz? I don't know what range I'm talking about, but atleast something that won't disturb animals or humans hehe.
I will listen to absolutely anything you've got to say because I've got nothing. So if you got a link / information about anything of what I'm asking for then I'm forever a follower and you shall be my jesus;)
<br><br><br>
Thanks!<br>
Regards,<br>
Harry | sound | arduino | communicate | null | null | 08/08/2011 22:48:56 | off topic | Arduino low hertz communication
===
<br><br>
I'm thinking about having two arduino's(nano) communicating with eachother, but I'm not 100% sure how. So I was thinking about the ways that are possible:
- Radio
- Visible Light
- Sound
- Wi-Fi
- 3G
And I believe that the best solution would be sound, low hertz like below the spectrum which animals / humans can hear.
Why do I believe that sound would be easiest?
<br>Because it can bounce on walls and mostly anything to get to a reciever and because it's the easiest way and most likely cheapest way to do it.
The question is: where do I find / how do I make such a device that can send and read low hertz? I don't know what range I'm talking about, but atleast something that won't disturb animals or humans hehe.
I will listen to absolutely anything you've got to say because I've got nothing. So if you got a link / information about anything of what I'm asking for then I'm forever a follower and you shall be my jesus;)
<br><br><br>
Thanks!<br>
Regards,<br>
Harry | 2 |
3,484,303 | 08/14/2010 17:07:37 | 420,505 | 08/14/2010 17:07:37 | 1 | 0 | Can you please explain this peice of code? | #include <styudio.h>
#include CONST15
#define CONST2 CONST2*CONST1
#define CONST3 CONST2+CONST2
int main(int argc,char**argv)
{
printf("%\n",CONST3);
}
| .cpp | null | null | null | null | 08/14/2010 18:28:49 | not a real question | Can you please explain this peice of code?
===
#include <styudio.h>
#include CONST15
#define CONST2 CONST2*CONST1
#define CONST3 CONST2+CONST2
int main(int argc,char**argv)
{
printf("%\n",CONST3);
}
| 1 |
10,178,540 | 04/16/2012 17:10:17 | 166,303 | 08/31/2009 23:48:43 | 1,692 | 79 | Backbone.js : Remove an item from a collection | I'm using backbone.js to implement a buddy list aka Roster. My backbone view for the Roster collection and individual rosterEntry are as follows:
Slx.Roster.Views.RosterEntry = Backbone.View.extend({
tagName: "li",
className : "rosterEntry clearfix",
templateSelector: '#rosterEntryTemplate',
initialize: function() {
_.bindAll(this, 'render');
this.model.bind('change', this.render);
this.model.bind('remove', this.remove);
this.template = _.template($("#rosterEntryTemplate").html());
},
remove: function () {
debug.log("Called remove event on model");
$(this.el).remove();
},
render: function() {
var renderedContent = this.template(this.model.toJSON());
this.id = this.model.Id;
$(this.el).attr('id', "friendid-" + this.model.get("id")).html(renderedContent);
return this;
}
});
Slx.Roster.Views.Roster = Backbone.View.extend({
el: "div#roster-container",
initialize: function () {
_.bindAll(this, 'render', 'add', 'remove');
this.template = _.template($("#rosterTemplate").html());
this.collection.bind('reset', this.render);
this.collection.bind('add', this.add);
this.collection.bind('remove', this.remove);
},
add: function (rosterEntry) {
var view = new Slx.Roster.Views.RosterEntry(
{
model: rosterEntry
});
$(this.el).append(view.render().el);
},
remove: function (model) { // if I ommit this then the whole collection is removed!!
debug.log("called remomve on collection");
},
render: function () {
var $rosterEntries, collection = this.collection;
$(this.el).html(this.template({}));
$rosterEntries = this.$('#friend-list');
_.each(collection.models, function (model) {
var rosterEntryView = new Slx.Roster.Views.RosterEntry({
model: model,
collection: collection
});
$(this.el).find("ul#friend-list").append(rosterEntryView.render().el);
}, this);
return this;
}
})
I'm testing for now using the Firebug console and can populate the roster just fine by executing the following:
collection = new Slx.Roster.Collection
view = new Slx.Roster.Views.Roster({collection:collection})
collection.fetch()
Adding to a collection also works fine, by executing the following in the Firebug console:
collection.add(new Slx.Roster.Model({username:"mickeymouse"})
and the new rosterEntry is added to the Roster.
My problem is that collection.remove(5) removes from the in-memory collection, but does nothing to update the DOM.
Strangely, if I ommit the remove() function from the Roster View, all the entries in the roster are removed. If I add this method with nothing in it but a console log, it the remove method on both the Roster and RosterEntry views is called - although I'm not sure why but they are out of order!
["Called remove event on model"]
["called remomve on collection"]
if I delete the remove function from the RosterEntry model I get this error:
TypeError: this.$el is undefined
this.$el.remove();
What am I doing wrong? How do I remove the element from the DOM when it is removed from the collection? | backbone.js | null | null | null | null | null | open | Backbone.js : Remove an item from a collection
===
I'm using backbone.js to implement a buddy list aka Roster. My backbone view for the Roster collection and individual rosterEntry are as follows:
Slx.Roster.Views.RosterEntry = Backbone.View.extend({
tagName: "li",
className : "rosterEntry clearfix",
templateSelector: '#rosterEntryTemplate',
initialize: function() {
_.bindAll(this, 'render');
this.model.bind('change', this.render);
this.model.bind('remove', this.remove);
this.template = _.template($("#rosterEntryTemplate").html());
},
remove: function () {
debug.log("Called remove event on model");
$(this.el).remove();
},
render: function() {
var renderedContent = this.template(this.model.toJSON());
this.id = this.model.Id;
$(this.el).attr('id', "friendid-" + this.model.get("id")).html(renderedContent);
return this;
}
});
Slx.Roster.Views.Roster = Backbone.View.extend({
el: "div#roster-container",
initialize: function () {
_.bindAll(this, 'render', 'add', 'remove');
this.template = _.template($("#rosterTemplate").html());
this.collection.bind('reset', this.render);
this.collection.bind('add', this.add);
this.collection.bind('remove', this.remove);
},
add: function (rosterEntry) {
var view = new Slx.Roster.Views.RosterEntry(
{
model: rosterEntry
});
$(this.el).append(view.render().el);
},
remove: function (model) { // if I ommit this then the whole collection is removed!!
debug.log("called remomve on collection");
},
render: function () {
var $rosterEntries, collection = this.collection;
$(this.el).html(this.template({}));
$rosterEntries = this.$('#friend-list');
_.each(collection.models, function (model) {
var rosterEntryView = new Slx.Roster.Views.RosterEntry({
model: model,
collection: collection
});
$(this.el).find("ul#friend-list").append(rosterEntryView.render().el);
}, this);
return this;
}
})
I'm testing for now using the Firebug console and can populate the roster just fine by executing the following:
collection = new Slx.Roster.Collection
view = new Slx.Roster.Views.Roster({collection:collection})
collection.fetch()
Adding to a collection also works fine, by executing the following in the Firebug console:
collection.add(new Slx.Roster.Model({username:"mickeymouse"})
and the new rosterEntry is added to the Roster.
My problem is that collection.remove(5) removes from the in-memory collection, but does nothing to update the DOM.
Strangely, if I ommit the remove() function from the Roster View, all the entries in the roster are removed. If I add this method with nothing in it but a console log, it the remove method on both the Roster and RosterEntry views is called - although I'm not sure why but they are out of order!
["Called remove event on model"]
["called remomve on collection"]
if I delete the remove function from the RosterEntry model I get this error:
TypeError: this.$el is undefined
this.$el.remove();
What am I doing wrong? How do I remove the element from the DOM when it is removed from the collection? | 0 |
10,265,200 | 04/22/2012 04:22:13 | 313,389 | 04/10/2010 08:52:41 | 1,210 | 13 | Difference between session in file and in database | What is the difference between storing sessions in file and in database?
| session | session-storage | session-store | null | null | 04/22/2012 20:42:07 | not a real question | Difference between session in file and in database
===
What is the difference between storing sessions in file and in database?
| 1 |
9,873,752 | 03/26/2012 14:12:27 | 456,105 | 09/23/2010 11:38:27 | 18 | 0 | How to convert en-media to img when convert enml to html | I'm working with evernote api on iOS, and want to translate enml to html. How to translate en-media to img? for example(I have removed the < and > flag, otherwise could not be show):
en-media:
en-media type="image/jpeg" width="1200" hash="317ba2d234cd395150f2789cd574c722" height="1600"
img:
img src="imagePath" /
I use core data to save information on iOS. So I can't give the local path of img file to "src = ". How to deal with this problem? | html | ios | evernote | null | null | null | open | How to convert en-media to img when convert enml to html
===
I'm working with evernote api on iOS, and want to translate enml to html. How to translate en-media to img? for example(I have removed the < and > flag, otherwise could not be show):
en-media:
en-media type="image/jpeg" width="1200" hash="317ba2d234cd395150f2789cd574c722" height="1600"
img:
img src="imagePath" /
I use core data to save information on iOS. So I can't give the local path of img file to "src = ". How to deal with this problem? | 0 |
8,846,738 | 01/13/2012 06:24:05 | 1,147,003 | 01/13/2012 05:24:21 | 6 | 0 | how to encrpt data through nunit with aes | I want to encrpt data with advance encrption standard through nunit.I have two random number and one key like-
(varible)s=random no1+random no2+random key
I want to encrpt the variable s through aes standard with another random key.how it can be possible. | c# | nunit | null | null | null | 01/13/2012 07:31:17 | not a real question | how to encrpt data through nunit with aes
===
I want to encrpt data with advance encrption standard through nunit.I have two random number and one key like-
(varible)s=random no1+random no2+random key
I want to encrpt the variable s through aes standard with another random key.how it can be possible. | 1 |
35,569 | 08/30/2008 01:51:05 | 3,594 | 08/29/2008 08:46:29 | 47 | 5 | Why does Python's __iter__ on a mapping return keys() instead of iteritems()? | It seems like if you want to get the keys of a mapping, you ask for them; otherwise, give me the _whole_ mapping (constituted by a set of key-value pairs). Is there a historical reason for this? | python | mapping | iteration | null | null | null | open | Why does Python's __iter__ on a mapping return keys() instead of iteritems()?
===
It seems like if you want to get the keys of a mapping, you ask for them; otherwise, give me the _whole_ mapping (constituted by a set of key-value pairs). Is there a historical reason for this? | 0 |
8,550,639 | 12/18/2011 08:34:43 | 689,593 | 04/03/2011 06:54:10 | 27 | 0 | how to correct this? | import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
//public class AddressBookDemo implements ActionListener
public class AddressBookDemo
{
ArrayList personsList;
//PersonDAO pDAO;
JFrame appFrame;
//JLabel jlbSl;
JTextField jtfQuestion;
JButton jbnClear, jbnForward, jbnBack, jbnFinish;
//String name, address, email;
//int phone;
//int recordNumber; // used to naviagate using >> and << buttons
Container cPane;
public static void main(String args[]){
new AddressBookDemo();
}
public void createGUI(){
/*Create a frame, get its contentpane and set layout*/
appFrame = new JFrame("Address Book");
cPane = appFrame.getContentPane();
cPane.setLayout(new GridBagLayout());
//Arrange components on contentPane and set Action Listeners to each JButton
arrangeComponents();
appFrame.setSize(240,300);
appFrame.setResizable(false);
appFrame.setVisible(true);
appFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void arrangeComponents(){
//jlbName = new JLabel("Name");
jtfQuestion = new JTextField(20);
jbnClear = new JButton("Clear");
jbnForward = new JButton(">>");
jbnBack = new JButton("<<");
jbnFinish = new JButton("Finish");
//GridBagConstraints gridBagConstraintsx01 = new GridBagConstraints();
//gridBagConstraintsx01.gridx = 0;
//gridBagConstraintsx01.gridy = 0;
//gridBagConstraintsx01.insets = new Insets(5, 5, 5, 5);
//cPane.add(jlbName, gridBagConstraintsx01);
GridBagConstraints gridBagConstraintsx04 = new GridBagConstraints();
gridBagConstraintsx04.gridx = 1;
gridBagConstraintsx04.insets = new Insets(5, 5, 5, 5);
gridBagConstraintsx04.gridy = 1;
gridBagConstraintsx04.gridwidth = 2;
gridBagConstraintsx04.fill = GridBagConstraints.BOTH;
cPane.add(jtfQuestion, gridBagConstraintsx04);
GridBagConstraints gridBagConstraintsx12 = new GridBagConstraints();
gridBagConstraintsx12.gridx = 0;
gridBagConstraintsx12.gridy = 5;
gridBagConstraintsx12.insets = new Insets(5, 5, 5, 5);
cPane.add(jbnBack, gridBagConstraintsx12);
GridBagConstraints gridBagConstraintsx14 = new GridBagConstraints();
gridBagConstraintsx14.gridx = 2;
gridBagConstraintsx14.gridy = 5;
gridBagConstraintsx14.insets = new Insets(5, 5, 5, 5);
cPane.add(jbnForward, gridBagConstraintsx14);
GridBagConstraints gridBagConstraintsx15 = new GridBagConstraints();
gridBagConstraintsx15.gridx = 1;
gridBagConstraintsx15.insets = new Insets(5, 5, 5, 5);
gridBagConstraintsx15.gridy = 6;
cPane.add(jbnClear, gridBagConstraintsx15);
GridBagConstraints gridBagConstraintsx16 = new GridBagConstraints();
gridBagConstraintsx16.gridx = 2;
gridBagConstraintsx16.gridy = 6;
gridBagConstraintsx16.insets = new Insets(5, 5, 5, 5);
cPane.add(jbnFinish, gridBagConstraintsx16);
//jbnClear.addActionListener(this);
//jbnForward.addActionListener(this);
//jbnBack.addActionListener(this);
//jbnExit.addActionListener(this);
}
}
this code is not working.wat's wrong with it?
this gui contain a textbox which retrieves data from database,finish button,back,forward button.while running,it doesn't shows any output
i can't trace out the error.applet is not working | java | gui | null | null | null | 12/18/2011 09:05:51 | too localized | how to correct this?
===
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
//public class AddressBookDemo implements ActionListener
public class AddressBookDemo
{
ArrayList personsList;
//PersonDAO pDAO;
JFrame appFrame;
//JLabel jlbSl;
JTextField jtfQuestion;
JButton jbnClear, jbnForward, jbnBack, jbnFinish;
//String name, address, email;
//int phone;
//int recordNumber; // used to naviagate using >> and << buttons
Container cPane;
public static void main(String args[]){
new AddressBookDemo();
}
public void createGUI(){
/*Create a frame, get its contentpane and set layout*/
appFrame = new JFrame("Address Book");
cPane = appFrame.getContentPane();
cPane.setLayout(new GridBagLayout());
//Arrange components on contentPane and set Action Listeners to each JButton
arrangeComponents();
appFrame.setSize(240,300);
appFrame.setResizable(false);
appFrame.setVisible(true);
appFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void arrangeComponents(){
//jlbName = new JLabel("Name");
jtfQuestion = new JTextField(20);
jbnClear = new JButton("Clear");
jbnForward = new JButton(">>");
jbnBack = new JButton("<<");
jbnFinish = new JButton("Finish");
//GridBagConstraints gridBagConstraintsx01 = new GridBagConstraints();
//gridBagConstraintsx01.gridx = 0;
//gridBagConstraintsx01.gridy = 0;
//gridBagConstraintsx01.insets = new Insets(5, 5, 5, 5);
//cPane.add(jlbName, gridBagConstraintsx01);
GridBagConstraints gridBagConstraintsx04 = new GridBagConstraints();
gridBagConstraintsx04.gridx = 1;
gridBagConstraintsx04.insets = new Insets(5, 5, 5, 5);
gridBagConstraintsx04.gridy = 1;
gridBagConstraintsx04.gridwidth = 2;
gridBagConstraintsx04.fill = GridBagConstraints.BOTH;
cPane.add(jtfQuestion, gridBagConstraintsx04);
GridBagConstraints gridBagConstraintsx12 = new GridBagConstraints();
gridBagConstraintsx12.gridx = 0;
gridBagConstraintsx12.gridy = 5;
gridBagConstraintsx12.insets = new Insets(5, 5, 5, 5);
cPane.add(jbnBack, gridBagConstraintsx12);
GridBagConstraints gridBagConstraintsx14 = new GridBagConstraints();
gridBagConstraintsx14.gridx = 2;
gridBagConstraintsx14.gridy = 5;
gridBagConstraintsx14.insets = new Insets(5, 5, 5, 5);
cPane.add(jbnForward, gridBagConstraintsx14);
GridBagConstraints gridBagConstraintsx15 = new GridBagConstraints();
gridBagConstraintsx15.gridx = 1;
gridBagConstraintsx15.insets = new Insets(5, 5, 5, 5);
gridBagConstraintsx15.gridy = 6;
cPane.add(jbnClear, gridBagConstraintsx15);
GridBagConstraints gridBagConstraintsx16 = new GridBagConstraints();
gridBagConstraintsx16.gridx = 2;
gridBagConstraintsx16.gridy = 6;
gridBagConstraintsx16.insets = new Insets(5, 5, 5, 5);
cPane.add(jbnFinish, gridBagConstraintsx16);
//jbnClear.addActionListener(this);
//jbnForward.addActionListener(this);
//jbnBack.addActionListener(this);
//jbnExit.addActionListener(this);
}
}
this code is not working.wat's wrong with it?
this gui contain a textbox which retrieves data from database,finish button,back,forward button.while running,it doesn't shows any output
i can't trace out the error.applet is not working | 3 |
8,521,954 | 12/15/2011 14:52:41 | 1,100,064 | 12/15/2011 14:33:41 | 1 | 0 | How to display 1 listview and other item in 1 layout? | I want display 1 listview and 1 and many other item (button, textview...) in 1 layout.
I have created a layout but this display only listview and don't display anything esle.
Any help would be appreciated | listview | button | android-layout | null | null | null | open | How to display 1 listview and other item in 1 layout?
===
I want display 1 listview and 1 and many other item (button, textview...) in 1 layout.
I have created a layout but this display only listview and don't display anything esle.
Any help would be appreciated | 0 |
8,604,103 | 12/22/2011 12:50:28 | 1,078,503 | 12/03/2011 02:24:49 | 81 | 3 | uWSGI Error:Python application not found | i have a problem when i used uwsgi: uWSGI Error:Python application not found.
my project:python2.7(django1.3)+uwsgi+nginx,running on Ubuntu 11.10.
I follow the tutorial configuration but i get an error.
this is my code:
django_wsgi.py
import os
os.environ['DJANGO_SETTINGS_MODULE']='mysite.settings'
import django.core.handlers.wsgi
applicaiton=django.core.handlers.wsgi.WSGIHandler()
django.xml
<uwsgi>
<socket>127.0.0.1:8630</socket>
<chdir>/home/mysite</chdir>
<pythonpath>..</pythonpath>
<module>django_wsgi</module>
</uwsgi>
nginx.conf
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8630;
}
wsgi.log
*** Operational MODE: preforking ***
added ../ to pythonpath.
unable to load app mountpoint=
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
In fact i have running successful on my server(centos) by the same configuration.
i read wsgi.log ,there have something difference.
wsgi.log(running successful on centos)
*** Operational MODE: preforking ***
added ../ to pythonpath.
WSGI application 0 (mountpoint=) ready on interpreter 0x1fcc350 pid: 1839 (default app)
*** uWSGI is running in multiple interpreter mode ***
I don't know why " unable to load app ",i tried google answer but failed.
think you for your help :)
| python | django | nginx | uwsgi | null | 07/05/2012 14:29:25 | off topic | uWSGI Error:Python application not found
===
i have a problem when i used uwsgi: uWSGI Error:Python application not found.
my project:python2.7(django1.3)+uwsgi+nginx,running on Ubuntu 11.10.
I follow the tutorial configuration but i get an error.
this is my code:
django_wsgi.py
import os
os.environ['DJANGO_SETTINGS_MODULE']='mysite.settings'
import django.core.handlers.wsgi
applicaiton=django.core.handlers.wsgi.WSGIHandler()
django.xml
<uwsgi>
<socket>127.0.0.1:8630</socket>
<chdir>/home/mysite</chdir>
<pythonpath>..</pythonpath>
<module>django_wsgi</module>
</uwsgi>
nginx.conf
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8630;
}
wsgi.log
*** Operational MODE: preforking ***
added ../ to pythonpath.
unable to load app mountpoint=
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
In fact i have running successful on my server(centos) by the same configuration.
i read wsgi.log ,there have something difference.
wsgi.log(running successful on centos)
*** Operational MODE: preforking ***
added ../ to pythonpath.
WSGI application 0 (mountpoint=) ready on interpreter 0x1fcc350 pid: 1839 (default app)
*** uWSGI is running in multiple interpreter mode ***
I don't know why " unable to load app ",i tried google answer but failed.
think you for your help :)
| 2 |
711,333 | 04/02/2009 19:53:32 | 79,178 | 03/17/2009 19:56:39 | 33 | 4 | Linux, Mono, shared libs and unresolved symbols | I have a shim library (shared, C++) which calls functions in another shared library (libexif) and presents a simple interface to C# for Platform Invoke calls. (That is, a C# program uses PInvoke to call my custom shared library which in turn calls another shared library.)
In Windows, my custom shared library links to the shared library when my custom library links and when the C# application executes, all symbols are resolved.
On Linux, linking my shared library does not link the other shared library. With a C++ driver, I specify the other library when the *application* is linked and at that time, all symbols are resolved. However, when I try to call my shared library from a C# program (compiled using mono) symbols in the other shared library are not resolved. I've tried using the MONO_PATH variable to specify the other library but it seems not to make a difference. I've also tried specifying the unresolved function in a DLLimport statement, but that seems not to help either.
How can I specify a shared library that is not directly called by C# code so that mono/cli finds it at run time?
I use the following commands to build the shared library:
g++ -fPIC -g -c -Wall libexif-wrapper.cpp
g++ -shared -Wl,-soname,libexif-wrapper.so.1 -o libexif-wrapper.so.1.0.1 libexif-wrapper.o -lc
ar rcs libexif-wrapper.a libexif-wrapper.so.1
And the following command line to compile my C# driver:
mcs -unsafe -define:LINUX Test-libexif-wrapper.cs
On execution I get an error that a symbol used by my shared library is not found:
/usr/bin/cli: symbol lookup error: ../../../C/libexif-wrapper/libexif-wrapper/libexif-wrapper.so.1: undefined symbol: exif_data_new_from_file
(libexif-wrapper is my shared library which serves as a shim between the C# application and libexif.)
I have not been able to figure out how to solve this. Any suggestions would be appreciated.
| c# | linux | mono | shared-libraries | null | null | open | Linux, Mono, shared libs and unresolved symbols
===
I have a shim library (shared, C++) which calls functions in another shared library (libexif) and presents a simple interface to C# for Platform Invoke calls. (That is, a C# program uses PInvoke to call my custom shared library which in turn calls another shared library.)
In Windows, my custom shared library links to the shared library when my custom library links and when the C# application executes, all symbols are resolved.
On Linux, linking my shared library does not link the other shared library. With a C++ driver, I specify the other library when the *application* is linked and at that time, all symbols are resolved. However, when I try to call my shared library from a C# program (compiled using mono) symbols in the other shared library are not resolved. I've tried using the MONO_PATH variable to specify the other library but it seems not to make a difference. I've also tried specifying the unresolved function in a DLLimport statement, but that seems not to help either.
How can I specify a shared library that is not directly called by C# code so that mono/cli finds it at run time?
I use the following commands to build the shared library:
g++ -fPIC -g -c -Wall libexif-wrapper.cpp
g++ -shared -Wl,-soname,libexif-wrapper.so.1 -o libexif-wrapper.so.1.0.1 libexif-wrapper.o -lc
ar rcs libexif-wrapper.a libexif-wrapper.so.1
And the following command line to compile my C# driver:
mcs -unsafe -define:LINUX Test-libexif-wrapper.cs
On execution I get an error that a symbol used by my shared library is not found:
/usr/bin/cli: symbol lookup error: ../../../C/libexif-wrapper/libexif-wrapper/libexif-wrapper.so.1: undefined symbol: exif_data_new_from_file
(libexif-wrapper is my shared library which serves as a shim between the C# application and libexif.)
I have not been able to figure out how to solve this. Any suggestions would be appreciated.
| 0 |
2,444,494 | 03/15/2010 00:50:05 | 293,645 | 03/15/2010 00:50:05 | 1 | 0 | Concatenate javascript to a sting/parameter in a function | I am using kottke.org's old JAH example to return some html to a div in a webpage. The code works fine if I use static text. However I need to get the value of a field to add to the string that is getting passed as the parameter to the function.
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
function getMyHTML(serverPage, objID) {
var obj = document.getElementById(objID);
xmlhttp.open("GET", serverPage);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
obj.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}
And on the page....
<a href="javascript://" onclick="getMyHTML('/WStepsDE?open&category="+document.getElementById('Employee').value;+"','goeshere')">Change it!</a></p>
<div id ="goeshere">Hey, this text will be replaced.</div>
It fails (with the help of Firebug) with the getMyHTML call where I try to get the value of Employee to include in the first parameter. The error is "Unterminated string literal". Thx in advance for your help. | javascript | function | concatenation | null | null | null | open | Concatenate javascript to a sting/parameter in a function
===
I am using kottke.org's old JAH example to return some html to a div in a webpage. The code works fine if I use static text. However I need to get the value of a field to add to the string that is getting passed as the parameter to the function.
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
function getMyHTML(serverPage, objID) {
var obj = document.getElementById(objID);
xmlhttp.open("GET", serverPage);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
obj.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}
And on the page....
<a href="javascript://" onclick="getMyHTML('/WStepsDE?open&category="+document.getElementById('Employee').value;+"','goeshere')">Change it!</a></p>
<div id ="goeshere">Hey, this text will be replaced.</div>
It fails (with the help of Firebug) with the getMyHTML call where I try to get the value of Employee to include in the first parameter. The error is "Unterminated string literal". Thx in advance for your help. | 0 |
6,384,694 | 06/17/2011 10:53:14 | 730,556 | 04/29/2011 06:23:41 | 27 | 2 | how to share photo on Facebook through my Android App ? | i am trying this i am success to post note but how about picture, photo, images
<pre>
import net.xeomax.FBRocket.FBRocket;
import net.xeomax.FBRocket.LoginListener;
import net.xeomax.FBRocket.ServerErrorException;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
public class Facebook extends Activity implements LoginListener {
private FBRocket fbRocket;
int i;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
shareFacebook();
}
public void shareFacebook() {
fbRocket = new FBRocket(this, "PitchFork TRY","c3968bbdd9dc7f44a8e05b7346f46673");
if (fbRocket.existsSavedFacebook()) {
fbRocket.loadFacebook();
} else {
fbRocket.login(R.layout.main);
}
}
//@Override
public void onLoginFail() {
fbRocket.displayToast("Login failed!");
}
//@Override
public void onLoginSuccess(net.xeomax.FBRocket.Facebook facebook) {
// TODO Auto-generated method stub
fbRocket.displayToast("Login success!");
Drawable bm = getResources().getDrawable(R.drawable.abook);
try {
facebook.setStatus("Hi, Friends this is post by me from my Android App, ");
fbRocket.displayDialog("Status Posted Successfully!! ");
} catch (ServerErrorException e) {
if (e.notLoggedIn()) {
fbRocket.login(R.layout.main);
} else {
System.out.println(e);
}
}
}
}
</pre>
from this code i am successfully post any Line, word but how can i share photo plz help me | android | null | null | null | null | 02/10/2012 19:26:21 | too localized | how to share photo on Facebook through my Android App ?
===
i am trying this i am success to post note but how about picture, photo, images
<pre>
import net.xeomax.FBRocket.FBRocket;
import net.xeomax.FBRocket.LoginListener;
import net.xeomax.FBRocket.ServerErrorException;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
public class Facebook extends Activity implements LoginListener {
private FBRocket fbRocket;
int i;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
shareFacebook();
}
public void shareFacebook() {
fbRocket = new FBRocket(this, "PitchFork TRY","c3968bbdd9dc7f44a8e05b7346f46673");
if (fbRocket.existsSavedFacebook()) {
fbRocket.loadFacebook();
} else {
fbRocket.login(R.layout.main);
}
}
//@Override
public void onLoginFail() {
fbRocket.displayToast("Login failed!");
}
//@Override
public void onLoginSuccess(net.xeomax.FBRocket.Facebook facebook) {
// TODO Auto-generated method stub
fbRocket.displayToast("Login success!");
Drawable bm = getResources().getDrawable(R.drawable.abook);
try {
facebook.setStatus("Hi, Friends this is post by me from my Android App, ");
fbRocket.displayDialog("Status Posted Successfully!! ");
} catch (ServerErrorException e) {
if (e.notLoggedIn()) {
fbRocket.login(R.layout.main);
} else {
System.out.println(e);
}
}
}
}
</pre>
from this code i am successfully post any Line, word but how can i share photo plz help me | 3 |
2,323,505 | 02/24/2010 03:33:02 | 184,600 | 10/05/2009 20:48:02 | 282 | 23 | How to keep track of model history with mapping table in Ruby on Rails? | ## dream
I'd like to keep record of when a user changes their address.
This way, when an order is placed, it will always be able to reference the user address that was used at the time of order placement.
## possible schema
users (
id
username
email
...
)
user_addresses (
id
label
line_1
line_2
city
state
zip
...
)
user_addresses_map (
user_id
user_address_id
start_time
end_time
)
orders (
id
user_id
user_address_id
order_status_id
...
created_at
updated_at
)
## in sql, this might look something like: [sql]
select ua.*
from orders o
join users u
on u.id = o.user_id
join user_addressses_map uam
on uam.user_id = u.id
and uam.user_address_id = o.user_address_id
join user_addresses ua
on ua.id = uam.user_address_id
and uam.start_time < o.created_at
and (uam.end_time >= o.created_at or uam.end_time is null)
; | ruby-on-rails | activerecord | schema | null | null | null | open | How to keep track of model history with mapping table in Ruby on Rails?
===
## dream
I'd like to keep record of when a user changes their address.
This way, when an order is placed, it will always be able to reference the user address that was used at the time of order placement.
## possible schema
users (
id
username
email
...
)
user_addresses (
id
label
line_1
line_2
city
state
zip
...
)
user_addresses_map (
user_id
user_address_id
start_time
end_time
)
orders (
id
user_id
user_address_id
order_status_id
...
created_at
updated_at
)
## in sql, this might look something like: [sql]
select ua.*
from orders o
join users u
on u.id = o.user_id
join user_addressses_map uam
on uam.user_id = u.id
and uam.user_address_id = o.user_address_id
join user_addresses ua
on ua.id = uam.user_address_id
and uam.start_time < o.created_at
and (uam.end_time >= o.created_at or uam.end_time is null)
; | 0 |
4,700,165 | 01/15/2011 14:43:44 | 480,385 | 10/19/2010 11:02:47 | 35 | 2 | convert ubuntu 10.04 desktop edition to ubuntu 10.04 server | can anyone please tell me how to upgrade the desktop edition into server edition of ubuntu? | ubuntu | ubuntu-10.04 | null | null | null | 07/24/2012 11:57:47 | off topic | convert ubuntu 10.04 desktop edition to ubuntu 10.04 server
===
can anyone please tell me how to upgrade the desktop edition into server edition of ubuntu? | 2 |
9,007,851 | 01/25/2012 18:10:53 | 110,098 | 05/20/2009 18:20:36 | 172 | 3 | Retrieve data from XML python | I am trying to traverse the Google XML to retrieve about 6 fields. I am using gdata provided by Google to pull the XML feed for the user profiles in my Google Apps Domain. This is the result:
<?xml version="1.0"?>
-<ns0:feed ns1:etag="W/"LIESANDCRAPfyt7I2A9WhHERE."" xmlns:ns4="http://www.w3.org/2007/app" xmlns:ns3="http://schemas.google.com/contact/2008" xmlns:ns2="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:ns1="http://schemas.google.com/g/2005" xmlns:ns0="http://www.w3.org/2005/Atom">
<ns0:updated>2012-01-25T14:52:12.867Z</ns0:updated>
<ns0:category term="http://schemas.google.com/contact/2008#profile" scheme="http://schemas.google.com/g/2005#kind"/>
<ns0:id>domain.com</ns0:id>
<ns0:generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</ns0:generator>
<ns0:author>
<ns0:name>domain.com</ns0:name>
</ns0:author>
<ns0:link type="text/html" rel="alternate" href="http://www.google.com/"/>
<ns0:link type="application/atom+xml" rel="http://schemas.google.com/g/2005#feed" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full"/>
<ns0:link type="application/atom+xml" rel="http://schemas.google.com/g/2005#batch" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full/batch"/>
<ns0:link type="application/atom+xml" rel="self" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full?max-results=300"/>
<ns2:startIndex>1</ns2:startIndex>
<ns2:itemsPerPage>300</ns2:itemsPerPage>
<ns0:entry ns1:etag=""CRAPQR4KTit7I2A4"">
<ns0:category term="http://schemas.google.com/contact/2008#profile" scheme="http://schemas.google.com/g/2005#kind"/>
<ns0:id>http://www.google.com/m8/feeds/profiles/domain/domain.com/full/nperson</ns0:id>
<ns1:name>
<ns1:familyName>Person</ns1:familyName>
<ns1:fullName>Name Person</ns1:fullName>
<ns1:givenName>Name</ns1:givenName>
</ns1:name>
<ns0:updated>2012-01-25T14:52:13.081Z</ns0:updated>
<ns1:organization rel="http://schemas.google.com/g/2005#work" primary="true">
<ns1:orgTitle>JobField</ns1:orgTitle>
<ns1:orgDepartment>DepartmentField</ns1:orgDepartment>
<ns1:orgName>CompanyField</ns1:orgName>
</ns1:organization>
<ns3:status indexed="true"/>
<ns0:title>Name Person</ns0:title>
<ns0:link type="image/*" rel="http://schemas.google.com/contacts/2008/rel#photo" href="https://www.google.com/m8/feeds/photos/profile/domain.com/nperson"/>
<ns0:link type="application/atom+xml" rel="self" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full/nperson"/>
<ns0:link type="application/atom+xml" rel="edit" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full/nperson"/>
<ns1:email rel="http://schemas.google.com/g/2005#other" address="[email protected]"/>
<ns1:email rel="http://schemas.google.com/g/2005#other" primary="true" address="[email protected]"/>
<ns4:edited>2012-01-25T14:52:13.081Z</ns4:edited>
</ns0:entry>
<ns0:title>domain.com's Profiles</ns0:title>
</ns0:feed>
I am trying to use lxml to parse the data, but it is not working out so well, this is my code:
import atom
import gdata.auth
import gdata.contacts
import gdata.contacts.client
from lxml import etree
from lxml import objectify
email = '[email protected]'
password = 'password'
domain = 'domain.com'
gd_client = gdata.contacts.client.ContactsClient(domain=domain)
gd_client.ClientLogin(email, password, 'profileFeedAPI')
profiles_feed = gd_client.GetProfilesFeed('https://www.google.com/m8/feeds/profiles/domain/domain.com/full?max-results=300')
def PrintFeed(feed):
for i, entry in enumerate(feed.entry):
print '\n%s %s' % (i+1, entry.title.text)
print(profiles_feed)
PrintFeed(profiles_feed)
profiles_feed2=(str(profiles_feed))
root = objectify.fromstring(profiles_feed2)
print root
print root.tag
print root.text
for e in root.entry():
print e.tag
print e.text
I can get this to return <xmlns:ns0="http://www.w3.org/2005/Atom">feed and then <xmlns:ns0="http://www.w3.org/2005/Atom">entry, but I cannot explore any farther. ALl I need is the text form the name fields in ns1 name and the org field in ns1 organization. I am a bit lost, so any help is greatly appreciated.
| python | xml | null | null | null | 01/25/2012 18:39:34 | not a real question | Retrieve data from XML python
===
I am trying to traverse the Google XML to retrieve about 6 fields. I am using gdata provided by Google to pull the XML feed for the user profiles in my Google Apps Domain. This is the result:
<?xml version="1.0"?>
-<ns0:feed ns1:etag="W/"LIESANDCRAPfyt7I2A9WhHERE."" xmlns:ns4="http://www.w3.org/2007/app" xmlns:ns3="http://schemas.google.com/contact/2008" xmlns:ns2="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:ns1="http://schemas.google.com/g/2005" xmlns:ns0="http://www.w3.org/2005/Atom">
<ns0:updated>2012-01-25T14:52:12.867Z</ns0:updated>
<ns0:category term="http://schemas.google.com/contact/2008#profile" scheme="http://schemas.google.com/g/2005#kind"/>
<ns0:id>domain.com</ns0:id>
<ns0:generator version="1.0" uri="http://www.google.com/m8/feeds">Contacts</ns0:generator>
<ns0:author>
<ns0:name>domain.com</ns0:name>
</ns0:author>
<ns0:link type="text/html" rel="alternate" href="http://www.google.com/"/>
<ns0:link type="application/atom+xml" rel="http://schemas.google.com/g/2005#feed" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full"/>
<ns0:link type="application/atom+xml" rel="http://schemas.google.com/g/2005#batch" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full/batch"/>
<ns0:link type="application/atom+xml" rel="self" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full?max-results=300"/>
<ns2:startIndex>1</ns2:startIndex>
<ns2:itemsPerPage>300</ns2:itemsPerPage>
<ns0:entry ns1:etag=""CRAPQR4KTit7I2A4"">
<ns0:category term="http://schemas.google.com/contact/2008#profile" scheme="http://schemas.google.com/g/2005#kind"/>
<ns0:id>http://www.google.com/m8/feeds/profiles/domain/domain.com/full/nperson</ns0:id>
<ns1:name>
<ns1:familyName>Person</ns1:familyName>
<ns1:fullName>Name Person</ns1:fullName>
<ns1:givenName>Name</ns1:givenName>
</ns1:name>
<ns0:updated>2012-01-25T14:52:13.081Z</ns0:updated>
<ns1:organization rel="http://schemas.google.com/g/2005#work" primary="true">
<ns1:orgTitle>JobField</ns1:orgTitle>
<ns1:orgDepartment>DepartmentField</ns1:orgDepartment>
<ns1:orgName>CompanyField</ns1:orgName>
</ns1:organization>
<ns3:status indexed="true"/>
<ns0:title>Name Person</ns0:title>
<ns0:link type="image/*" rel="http://schemas.google.com/contacts/2008/rel#photo" href="https://www.google.com/m8/feeds/photos/profile/domain.com/nperson"/>
<ns0:link type="application/atom+xml" rel="self" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full/nperson"/>
<ns0:link type="application/atom+xml" rel="edit" href="https://www.google.com/m8/feeds/profiles/domain/domain.com/full/nperson"/>
<ns1:email rel="http://schemas.google.com/g/2005#other" address="[email protected]"/>
<ns1:email rel="http://schemas.google.com/g/2005#other" primary="true" address="[email protected]"/>
<ns4:edited>2012-01-25T14:52:13.081Z</ns4:edited>
</ns0:entry>
<ns0:title>domain.com's Profiles</ns0:title>
</ns0:feed>
I am trying to use lxml to parse the data, but it is not working out so well, this is my code:
import atom
import gdata.auth
import gdata.contacts
import gdata.contacts.client
from lxml import etree
from lxml import objectify
email = '[email protected]'
password = 'password'
domain = 'domain.com'
gd_client = gdata.contacts.client.ContactsClient(domain=domain)
gd_client.ClientLogin(email, password, 'profileFeedAPI')
profiles_feed = gd_client.GetProfilesFeed('https://www.google.com/m8/feeds/profiles/domain/domain.com/full?max-results=300')
def PrintFeed(feed):
for i, entry in enumerate(feed.entry):
print '\n%s %s' % (i+1, entry.title.text)
print(profiles_feed)
PrintFeed(profiles_feed)
profiles_feed2=(str(profiles_feed))
root = objectify.fromstring(profiles_feed2)
print root
print root.tag
print root.text
for e in root.entry():
print e.tag
print e.text
I can get this to return <xmlns:ns0="http://www.w3.org/2005/Atom">feed and then <xmlns:ns0="http://www.w3.org/2005/Atom">entry, but I cannot explore any farther. ALl I need is the text form the name fields in ns1 name and the org field in ns1 organization. I am a bit lost, so any help is greatly appreciated.
| 1 |
11,597,036 | 07/22/2012 01:06:33 | 1,543,391 | 07/22/2012 00:55:08 | 1 | 0 | Pronouncing phonics in eng | I want to create an application which can pronounce phonics for each English alphabet. Is there any text to speech library/tool which can provide this (Java or .NET).
Thanks! | text-to-speech | null | null | null | null | 07/22/2012 13:33:38 | not constructive | Pronouncing phonics in eng
===
I want to create an application which can pronounce phonics for each English alphabet. Is there any text to speech library/tool which can provide this (Java or .NET).
Thanks! | 4 |
11,541,389 | 07/18/2012 12:30:08 | 1,194,078 | 02/07/2012 07:32:34 | 8 | 0 | How to compare two columns from 2 different tables in 2 datasets in ASP.NET C# | **I have 2 tables Table1 and Table2 in 2 dataset.
Both the tables are having the column "ID".
I want to find the diffrence in values present in column "ID"**
| c# | sql-server-2008 | null | null | null | 07/19/2012 04:46:49 | not a real question | How to compare two columns from 2 different tables in 2 datasets in ASP.NET C#
===
**I have 2 tables Table1 and Table2 in 2 dataset.
Both the tables are having the column "ID".
I want to find the diffrence in values present in column "ID"**
| 1 |
3,761,735 | 09/21/2010 15:16:24 | 446,576 | 09/13/2010 17:14:29 | 10 | 0 | JSF, postback and database alteration | I'm using JSF, Google App Engine, and OpenSessionInView (using Filter and ThreadLocal).
My bean has a private field `List<A> allElements;`
The property `getAllElements()` retrieves from the database the data, the first time, i.e. when `allElements == null`.
In the page, I have a dataTable binded with `{#MyBean.allElements}`.
Finally, there is button "new line", linked to the `{#MyBean.newLine}` method.
The inputText fields are well initialized but, if I change some value and I click on the "new line" button, the values that I have changed are also altered in the database...
How can I avoid this behavior and have my data saved only when I click on some"save and commit" button ? | google-app-engine | jsf | javabeans | autocommit | null | null | open | JSF, postback and database alteration
===
I'm using JSF, Google App Engine, and OpenSessionInView (using Filter and ThreadLocal).
My bean has a private field `List<A> allElements;`
The property `getAllElements()` retrieves from the database the data, the first time, i.e. when `allElements == null`.
In the page, I have a dataTable binded with `{#MyBean.allElements}`.
Finally, there is button "new line", linked to the `{#MyBean.newLine}` method.
The inputText fields are well initialized but, if I change some value and I click on the "new line" button, the values that I have changed are also altered in the database...
How can I avoid this behavior and have my data saved only when I click on some"save and commit" button ? | 0 |
5,021,481 | 02/16/2011 20:01:01 | 193,152 | 10/20/2009 14:18:21 | 110 | 4 | How to communicate between PHP and WCF securely | My system is based on .net. Their system is based on PHP. We want to exchange information for lookups and to add data to the respective databases. This has to be done securely and the two systems will be the only players in this game.
I've been doing some research but things related to security always throws me off. I have to admit that I'm having some trouble fully understanding what everything is in the config file (web.config in the WCF web service site).
Where do I start in ensuring that they transmit the data securely? Assuming I figure out the binding stuff, would they be sending a username and password that I will have to extract from their message? The client would be connecting to a https address.
After typing all this out, I think I'm a bit more lost than I thought I was. | php | wcf | security | null | null | null | open | How to communicate between PHP and WCF securely
===
My system is based on .net. Their system is based on PHP. We want to exchange information for lookups and to add data to the respective databases. This has to be done securely and the two systems will be the only players in this game.
I've been doing some research but things related to security always throws me off. I have to admit that I'm having some trouble fully understanding what everything is in the config file (web.config in the WCF web service site).
Where do I start in ensuring that they transmit the data securely? Assuming I figure out the binding stuff, would they be sending a username and password that I will have to extract from their message? The client would be connecting to a https address.
After typing all this out, I think I'm a bit more lost than I thought I was. | 0 |
3,776,794 | 09/23/2010 09:02:12 | 371,684 | 06/20/2010 20:11:47 | 73 | 7 | How to create x-code project for iPhone Light version app? | What is the recommended way to create a Light version of iPhone App?
I have an x-code project of my iPhone app which I want to charge money for it. In addition to that app, I would like to deploy additional "light" version of this app free of charge which of course will have some limitations.
Best way I can think of is adding a new 'Light' configuration in my existing x-code project and define a constant like LIGHT_VERSION only in this configuration that will be tested in my code.
Will that solution work? or do I have to create a new 'Light' project pointing to all sources and resources of original project?
Any tips will be appreciated. | iphone | xcode | deployment | null | null | null | open | How to create x-code project for iPhone Light version app?
===
What is the recommended way to create a Light version of iPhone App?
I have an x-code project of my iPhone app which I want to charge money for it. In addition to that app, I would like to deploy additional "light" version of this app free of charge which of course will have some limitations.
Best way I can think of is adding a new 'Light' configuration in my existing x-code project and define a constant like LIGHT_VERSION only in this configuration that will be tested in my code.
Will that solution work? or do I have to create a new 'Light' project pointing to all sources and resources of original project?
Any tips will be appreciated. | 0 |
10,559,431 | 05/11/2012 22:34:25 | 623,850 | 02/18/2011 22:03:05 | 372 | 9 | Windows 8 Metro-UI IndexedDB | Trying to build a Metro app using Javascript and having issues with IndexedDb. I cannot create a store. My code is shown below. I'm doing this on success of the open() function.
var db = evt.target.result;
if (!db.objectStoreNames.contains("test")) {
var store = db.createObjectStore("test");
}
Every time, it throws an exception that says
> 0x800a139e - JavaScript runtime error: [object IDBDatabaseException]
[Over here][1] they talk about it but and it's a nice example to look at too, but still, did not help me.
[1]: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/a63ce772-0d88-4e90-a4b5-84fce275987f | javascript | html5 | windows-8 | metro-ui | null | null | open | Windows 8 Metro-UI IndexedDB
===
Trying to build a Metro app using Javascript and having issues with IndexedDb. I cannot create a store. My code is shown below. I'm doing this on success of the open() function.
var db = evt.target.result;
if (!db.objectStoreNames.contains("test")) {
var store = db.createObjectStore("test");
}
Every time, it throws an exception that says
> 0x800a139e - JavaScript runtime error: [object IDBDatabaseException]
[Over here][1] they talk about it but and it's a nice example to look at too, but still, did not help me.
[1]: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/a63ce772-0d88-4e90-a4b5-84fce275987f | 0 |
11,346,913 | 07/05/2012 14:54:00 | 1,299,490 | 03/28/2012 23:42:35 | 13 | 0 | Decimal mathematics operations and decimal array | i just stuck with my school project in c# and i have big problem with double precision.
I try to work with decimal but always getting error overload method.
This is my source code:
private void izracunaj_Click(object sender, EventArgs e)
{
double Num;
string masa_voz = masa_vozila_otp_usp.Text.Trim();
bool masa_vozisnum = double.TryParse(masa_voz, out Num);
if (masa_vozisnum)
{
double m = double.Parse(masa_vozila_otp_usp.Text);
double[] P = { 4, 8, 12, 16, 20, 24, 28, 32 };
double[] a = { Math.Atan(P[0] / 100), Math.Atan(P[1] / 100), Math.Atan(P[2] / 100), Math.Atan(P[3] / 100), Math.Atan(P[4] / 100), Math.Atan(P[5] / 100), Math.Atan(P[6] / 100), Math.Atan(P[7] / 100), };
double[] sina = { Math.Sin(a[0]), Math.Sin(a[1]), Math.Sin(a[2]), Math.Sin(a[3]), Math.Sin(a[4]), Math.Sin(a[5]), Math.Sin(a[6]), Math.Sin(a[7]) };
double G = m * 9.81;
double[] Ra = { G * sina[0], G * sina[1], G * sina[2], G * sina[3], G * sina[4], G * sina[5], G * sina[6], G * sina[7] };
otp_uspona_tbl.Rows.Add(new Object[] { "sin a", sina[0].ToString(), sina[1].ToString(), sina[2].ToString(), sina[3].ToString(), sina[4].ToString(), sina[5].ToString(), sina[6].ToString(), sina[7].ToString() });
otp_uspona_tbl.Rows.Add(new Object[] { "Ra", Ra[0].ToString(), Ra[1].ToString(), Ra[2].ToString(), Ra[3].ToString(), Ra[4].ToString(), Ra[5].ToString(), Ra[6].ToString(), Ra[7].ToString() });
}
else
{
MessageBox.Show("Vrednost u poljima mora biti brojna vrednost", "Greska");
}
}
How i can calculate arrays with decimals precision, also i try decimal.Multiply( var1, var2) but always got overload method invalid arguments. | c# | .net | null | null | null | 07/06/2012 04:06:35 | too localized | Decimal mathematics operations and decimal array
===
i just stuck with my school project in c# and i have big problem with double precision.
I try to work with decimal but always getting error overload method.
This is my source code:
private void izracunaj_Click(object sender, EventArgs e)
{
double Num;
string masa_voz = masa_vozila_otp_usp.Text.Trim();
bool masa_vozisnum = double.TryParse(masa_voz, out Num);
if (masa_vozisnum)
{
double m = double.Parse(masa_vozila_otp_usp.Text);
double[] P = { 4, 8, 12, 16, 20, 24, 28, 32 };
double[] a = { Math.Atan(P[0] / 100), Math.Atan(P[1] / 100), Math.Atan(P[2] / 100), Math.Atan(P[3] / 100), Math.Atan(P[4] / 100), Math.Atan(P[5] / 100), Math.Atan(P[6] / 100), Math.Atan(P[7] / 100), };
double[] sina = { Math.Sin(a[0]), Math.Sin(a[1]), Math.Sin(a[2]), Math.Sin(a[3]), Math.Sin(a[4]), Math.Sin(a[5]), Math.Sin(a[6]), Math.Sin(a[7]) };
double G = m * 9.81;
double[] Ra = { G * sina[0], G * sina[1], G * sina[2], G * sina[3], G * sina[4], G * sina[5], G * sina[6], G * sina[7] };
otp_uspona_tbl.Rows.Add(new Object[] { "sin a", sina[0].ToString(), sina[1].ToString(), sina[2].ToString(), sina[3].ToString(), sina[4].ToString(), sina[5].ToString(), sina[6].ToString(), sina[7].ToString() });
otp_uspona_tbl.Rows.Add(new Object[] { "Ra", Ra[0].ToString(), Ra[1].ToString(), Ra[2].ToString(), Ra[3].ToString(), Ra[4].ToString(), Ra[5].ToString(), Ra[6].ToString(), Ra[7].ToString() });
}
else
{
MessageBox.Show("Vrednost u poljima mora biti brojna vrednost", "Greska");
}
}
How i can calculate arrays with decimals precision, also i try decimal.Multiply( var1, var2) but always got overload method invalid arguments. | 3 |
11,152,302 | 06/22/2012 07:59:48 | 983,783 | 10/07/2011 10:18:22 | 162 | 0 | Shopping Cart Ideas | I would like you guys to help me concerning a shopping cart decision. I know shopping carts like "Magento Community Edition(very big software)", "OpenCart", "Prestashop", etc, are opensource and maybe huge to develop by one programmer.
What about hosted shopping carts like "shopify", "BigCommerce", "3dCart", etc.. are these carts too huge for a one programmer to develop them within 0-2yrs?
Are there huge differences between the opensource carts and the hosted carts?
What PHP Framework will you recommend?
Thanks for your answer. | php | shopping-cart | null | null | null | 06/22/2012 19:12:41 | not constructive | Shopping Cart Ideas
===
I would like you guys to help me concerning a shopping cart decision. I know shopping carts like "Magento Community Edition(very big software)", "OpenCart", "Prestashop", etc, are opensource and maybe huge to develop by one programmer.
What about hosted shopping carts like "shopify", "BigCommerce", "3dCart", etc.. are these carts too huge for a one programmer to develop them within 0-2yrs?
Are there huge differences between the opensource carts and the hosted carts?
What PHP Framework will you recommend?
Thanks for your answer. | 4 |
6,000,766 | 05/14/2011 08:52:14 | 713,789 | 04/18/2011 16:41:27 | 74 | 0 | how to design Guest posting system for cooking related Website ? | i want to make a Guest posting system in ASP.NET MVC for a cooking website. i want to make it without flash or less use of Flash.
i want to make them upon pure jQuery so i used ajax uploading of images [for without refresh see them]
i see a sample online http://allrecipes.co.in/cooks/my-stuff/submit-a-recipe.aspx but i need to make much better then it and i want to make them without flash using jQuery.
can someone show me what thing i need to use or any suggestion how i can make it on javascript.
any example or suggestion help me to do this
username :anirudha
password :password | c# | asp.net-mvc | null | null | null | 05/16/2011 02:01:19 | not a real question | how to design Guest posting system for cooking related Website ?
===
i want to make a Guest posting system in ASP.NET MVC for a cooking website. i want to make it without flash or less use of Flash.
i want to make them upon pure jQuery so i used ajax uploading of images [for without refresh see them]
i see a sample online http://allrecipes.co.in/cooks/my-stuff/submit-a-recipe.aspx but i need to make much better then it and i want to make them without flash using jQuery.
can someone show me what thing i need to use or any suggestion how i can make it on javascript.
any example or suggestion help me to do this
username :anirudha
password :password | 1 |
10,650,918 | 05/18/2012 10:27:45 | 972,809 | 09/30/2011 09:33:46 | 114 | 13 | How to check if one array elements entirely exists in another array in php | I have to arrays for example
array1={1,2,3,4,5,6,7,8,9};
array2={4,6,9}
is there any function so that i can determine that array2 fully exists in array1
i know i can use in_array function in a loop but in cases where i will have large arrays with hundreds of elements so i am searching for a function
please help | php | arrays | null | null | null | null | open | How to check if one array elements entirely exists in another array in php
===
I have to arrays for example
array1={1,2,3,4,5,6,7,8,9};
array2={4,6,9}
is there any function so that i can determine that array2 fully exists in array1
i know i can use in_array function in a loop but in cases where i will have large arrays with hundreds of elements so i am searching for a function
please help | 0 |
5,652,642 | 04/13/2011 16:40:42 | 172,637 | 09/13/2009 00:11:44 | 3,890 | 134 | C/C++ CSS Parser with CSS3 support? | Is there any CSS parser for C/C++ with CSS3 support? I found a few but they all don't support CSS3 yet.
| c++ | css | c | parsing | css3 | null | open | C/C++ CSS Parser with CSS3 support?
===
Is there any CSS parser for C/C++ with CSS3 support? I found a few but they all don't support CSS3 yet.
| 0 |
3,548,786 | 08/23/2010 15:00:38 | 348,700 | 05/24/2010 06:03:28 | 338 | 5 | What do you think of Microsoft's new RAD tool "Lightswitch"? | What do you think of Microsoft's new develeopment tool "**Lightswitch**"? Is it worth to take a look on it? I am not sure, who is the target group of this new **RAD tool**? It seems to me as a kind of **Access** or **Foxpro** for **Silverlight**!?!? Makes it sense to deal with it as a "normal" experienced developer? | .net | silverlight | visual-studio-lightswitch | null | null | 08/23/2010 15:07:18 | not constructive | What do you think of Microsoft's new RAD tool "Lightswitch"?
===
What do you think of Microsoft's new develeopment tool "**Lightswitch**"? Is it worth to take a look on it? I am not sure, who is the target group of this new **RAD tool**? It seems to me as a kind of **Access** or **Foxpro** for **Silverlight**!?!? Makes it sense to deal with it as a "normal" experienced developer? | 4 |
3,778,206 | 09/23/2010 12:12:10 | 131,637 | 07/01/2009 11:11:23 | 935 | 39 | How to I get the value of a radio button with javascript | I need to obtain the value of a radio button using javascript
I have a radio group called **selection**
<input type="radio" name="selection" id="selection" value="allClients" checked="checked" />All Clients<br />
<input type="radio" name="selection" id="selection1" value="dateRange" />Date Range between
I pass the value to another page using javascript
onclick="do_action1('liveClickCampaigns','contract_type='+document.getElementById('contract_type').value+'&beginDate='+document.getElementById('beginDate').value+'&endDate='+document.getElementById('endDate').value+'&selection1='+document.getElementById('selection1').value+'&selection='+document.getElementById('selection').value,'content');" type="button">
The document.getElementById('selection').value needs to get the value, but it keeps giving me the value of the first radio button even though the second is selected. The radio group is not within a form | javascript | html | null | null | null | null | open | How to I get the value of a radio button with javascript
===
I need to obtain the value of a radio button using javascript
I have a radio group called **selection**
<input type="radio" name="selection" id="selection" value="allClients" checked="checked" />All Clients<br />
<input type="radio" name="selection" id="selection1" value="dateRange" />Date Range between
I pass the value to another page using javascript
onclick="do_action1('liveClickCampaigns','contract_type='+document.getElementById('contract_type').value+'&beginDate='+document.getElementById('beginDate').value+'&endDate='+document.getElementById('endDate').value+'&selection1='+document.getElementById('selection1').value+'&selection='+document.getElementById('selection').value,'content');" type="button">
The document.getElementById('selection').value needs to get the value, but it keeps giving me the value of the first radio button even though the second is selected. The radio group is not within a form | 0 |
5,638,962 | 04/12/2011 17:04:35 | 704,425 | 04/12/2011 15:45:45 | 1 | 0 | Can I use GetDataRow() on a view if the view's datasource is IQueryable? | I am implementing drag and drop functionality in a form and I'm running into a situation where I need to GetDataRow, but the view has been bound to an IQueryable<ENTITY>, as such:
private void stackOverFlow()
{
Func<int, IQueryable> query = i =>
from p in _data.PERSON
where p.FavoriteNumber == i
select p;
gc1.DataSource = query(17);
var row = ((GridView) gc1.DefaultView).GetDataRow(0);
}
The row is always null due to the nature of the binding... Any help would be highly appreciated.
Thanks | c# | linq | linq-to-sql | drag-and-drop | devexpress | null | open | Can I use GetDataRow() on a view if the view's datasource is IQueryable?
===
I am implementing drag and drop functionality in a form and I'm running into a situation where I need to GetDataRow, but the view has been bound to an IQueryable<ENTITY>, as such:
private void stackOverFlow()
{
Func<int, IQueryable> query = i =>
from p in _data.PERSON
where p.FavoriteNumber == i
select p;
gc1.DataSource = query(17);
var row = ((GridView) gc1.DefaultView).GetDataRow(0);
}
The row is always null due to the nature of the binding... Any help would be highly appreciated.
Thanks | 0 |
10,197,945 | 04/17/2012 19:36:44 | 1,215,147 | 02/17/2012 00:56:05 | 1 | 0 | Java Moving Up Window | Im making a doodle-jump style game in java and I have having trouble figuring out how to "move up" in the java container that the game is being played in. The doodle guy has to jump from ledge to ledge and get as high as possible, so I need the panel to pan up as the guy moves up. How would I go about doing this? | java | swing | null | null | null | 04/19/2012 02:38:53 | not a real question | Java Moving Up Window
===
Im making a doodle-jump style game in java and I have having trouble figuring out how to "move up" in the java container that the game is being played in. The doodle guy has to jump from ledge to ledge and get as high as possible, so I need the panel to pan up as the guy moves up. How would I go about doing this? | 1 |
7,453,282 | 09/17/2011 07:40:49 | 315,625 | 04/13/2010 15:12:23 | 874 | 16 | When Building an N-Tier application, how should I organize my names spaces? | So when I started trying to build my websites in an n-tier architecture, I was worried about performance.
One of the guys who answered the question told me if you applied a good architecture you'd end up with even a better performance. It's related to compiling the dlls and stuff, but now I'm not sure how to name my namespaces.
Like I have the main Namespace for my data access layer so let's say I have this namespace as my data layer ..DAL
but now I have more than entity in the application that needs to be served by this layer, and each entity has it's own smaller entities.
so should I include all the data code under one Namespace (DAL) or should I each entity have it's own namespace like DAL.E1 and DAL.E2 or each main or child entity should have it's own namespace like DAL.E1.c1, DAL.E2, DAL.E3.c1, DAL.E3.c2 .. last question should DAL itself include any classes or not ? | c# | asp.net | architecture | namespaces | n-tier | null | open | When Building an N-Tier application, how should I organize my names spaces?
===
So when I started trying to build my websites in an n-tier architecture, I was worried about performance.
One of the guys who answered the question told me if you applied a good architecture you'd end up with even a better performance. It's related to compiling the dlls and stuff, but now I'm not sure how to name my namespaces.
Like I have the main Namespace for my data access layer so let's say I have this namespace as my data layer ..DAL
but now I have more than entity in the application that needs to be served by this layer, and each entity has it's own smaller entities.
so should I include all the data code under one Namespace (DAL) or should I each entity have it's own namespace like DAL.E1 and DAL.E2 or each main or child entity should have it's own namespace like DAL.E1.c1, DAL.E2, DAL.E3.c1, DAL.E3.c2 .. last question should DAL itself include any classes or not ? | 0 |
5,855,363 | 05/02/2011 09:11:02 | 698,582 | 04/08/2011 11:53:33 | 19 | 1 | bug when I'm using dateComponents and NSDate | I'm using some NSDate and NSDatecomponents and my app crash when I'm using its through my virtual device.
@interface ... {
@protected
NSDATECOmponents *dateCOmponents;
NSDate *date;
NSCalendar *gregorian;
}
And in the implementation code :
- (void)viewDidLoad {
[super viewDidLoad];
date = [[NSDate alloc] init];
gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
[gregorian setTimeZone:[NSTimeZone timeZoneWithName:@"GMT+2"]];
dateComponents = [[NSDateComponents alloc] init];
...
And when I'm swiping, I launch a method that contains :
switch (self.segmentedControl.selectedSegmentIndex) {
case 0:
NSLog(@"before : %@", date);
[dateComponents setDay:-1];
date = [gregorian dateByAddingComponents:dateComponents toDate:date options:0];
NSLog(@"after : %@", date);
break;
case 1:
NSLog(@"before : %@", date);
[dateComponents setMonth:-1];
date = [gregorian dateByAddingComponents:dateComponents toDate:date options:0];
NSLog(@"after : %@", date);
break;
case 2:
NSLog(@"before : %@", date);
[dateComponents setYear:-1];
date = [gregorian dateByAddingComponents:dateComponents toDate:date options:0];
NSLog(@"after : %@", date);
break;
default:
break;
}
I hope that is quite clear for you :-)
Thanks to help me !!!!!!!!!!!!
| iphone | memory-leaks | iphone-simulator | nsdate | nsdatecomponents | 02/14/2012 20:44:09 | too localized | bug when I'm using dateComponents and NSDate
===
I'm using some NSDate and NSDatecomponents and my app crash when I'm using its through my virtual device.
@interface ... {
@protected
NSDATECOmponents *dateCOmponents;
NSDate *date;
NSCalendar *gregorian;
}
And in the implementation code :
- (void)viewDidLoad {
[super viewDidLoad];
date = [[NSDate alloc] init];
gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
[gregorian setTimeZone:[NSTimeZone timeZoneWithName:@"GMT+2"]];
dateComponents = [[NSDateComponents alloc] init];
...
And when I'm swiping, I launch a method that contains :
switch (self.segmentedControl.selectedSegmentIndex) {
case 0:
NSLog(@"before : %@", date);
[dateComponents setDay:-1];
date = [gregorian dateByAddingComponents:dateComponents toDate:date options:0];
NSLog(@"after : %@", date);
break;
case 1:
NSLog(@"before : %@", date);
[dateComponents setMonth:-1];
date = [gregorian dateByAddingComponents:dateComponents toDate:date options:0];
NSLog(@"after : %@", date);
break;
case 2:
NSLog(@"before : %@", date);
[dateComponents setYear:-1];
date = [gregorian dateByAddingComponents:dateComponents toDate:date options:0];
NSLog(@"after : %@", date);
break;
default:
break;
}
I hope that is quite clear for you :-)
Thanks to help me !!!!!!!!!!!!
| 3 |
3,517,470 | 08/18/2010 23:12:38 | 9,382 | 09/15/2008 18:36:29 | 6,518 | 142 | Why am I getting a serialization error? | I have the following code:
class Program
{
static void Main(string[] args)
{
string xml = @"<ArrayOfUserSetting>
<UserSetting>
<Value>Proposals</Value>
<Name>LastGroup</Name>
</UserSetting>
<UserSetting>
<Value>Visible</Value>
<Name>WidgetsVisibility</Name>
</UserSetting>
</ArrayOfUserSetting>";
List<UserSetting> settings =
GetObjFromXmlDocument<List<UserSetting>>(xml);
}
public static T GetObjFromXmlDocument<T>(string xml)
{
T customType;
XmlSerializer serializer = new XmlSerializer(typeof(T));
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.LoadXml(xml);
using (XmlNodeReader xmlNodeReader = new XmlNodeReader(xmlDocument))
{
customType = (T)serializer.Deserialize(xmlNodeReader);
}
return customType;
}
}
[Serializable]
public class UserSetting
{
public string Value { get; set; }
public string Name { get; set; }
}
The code works fine and the call to GetObjFromXmlDocument yields a List<UserSetting> collection. However, I always get a first chance exception of type `System.IO.FileNotFoundException` in mscorlib.dll, when `XmlSerializer serializer = new XmlSerializer(typeof(T));` is executed.
So I went into Debug/Exception and turned on Managed Debugging Assistants. I got the following on that line:
> The assembly with display name 'mscorlib.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Can someone explain why this is happening? Is there something I could do to the `UserSetting` class to make the problem disappear? The application is quite performance sensitive and I'd rather not have the exception.
| c# | exception | .net-3.5 | serialization | c#-3.0 | null | open | Why am I getting a serialization error?
===
I have the following code:
class Program
{
static void Main(string[] args)
{
string xml = @"<ArrayOfUserSetting>
<UserSetting>
<Value>Proposals</Value>
<Name>LastGroup</Name>
</UserSetting>
<UserSetting>
<Value>Visible</Value>
<Name>WidgetsVisibility</Name>
</UserSetting>
</ArrayOfUserSetting>";
List<UserSetting> settings =
GetObjFromXmlDocument<List<UserSetting>>(xml);
}
public static T GetObjFromXmlDocument<T>(string xml)
{
T customType;
XmlSerializer serializer = new XmlSerializer(typeof(T));
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.LoadXml(xml);
using (XmlNodeReader xmlNodeReader = new XmlNodeReader(xmlDocument))
{
customType = (T)serializer.Deserialize(xmlNodeReader);
}
return customType;
}
}
[Serializable]
public class UserSetting
{
public string Value { get; set; }
public string Name { get; set; }
}
The code works fine and the call to GetObjFromXmlDocument yields a List<UserSetting> collection. However, I always get a first chance exception of type `System.IO.FileNotFoundException` in mscorlib.dll, when `XmlSerializer serializer = new XmlSerializer(typeof(T));` is executed.
So I went into Debug/Exception and turned on Managed Debugging Assistants. I got the following on that line:
> The assembly with display name 'mscorlib.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Can someone explain why this is happening? Is there something I could do to the `UserSetting` class to make the problem disappear? The application is quite performance sensitive and I'd rather not have the exception.
| 0 |
6,714,020 | 07/15/2011 22:57:09 | 394,933 | 07/18/2010 01:44:33 | 445 | 15 | How can a service listen for touch gestures/events? | I'm wondering how apps like SwipePad and Wave Launcher are able to detect touch gestures/events simply through a service. These apps are able to detect a touch gestures even though it is not in their own Activity. I've looked all over the Internet and haven't found how they can do that.
My main question is how a service can listen in on touch guestures/events just as a regular Activity may receive MotionEvents even though it may not be in the original Activity or context. I'm essentially trying a build an app that will recongize a particular touch gesture from a user regardless which Activity is on top and do something when that gesture is recongized. The touch recongition will be a thread running in the background as a service. | android | events | service | touch | gesture | null | open | How can a service listen for touch gestures/events?
===
I'm wondering how apps like SwipePad and Wave Launcher are able to detect touch gestures/events simply through a service. These apps are able to detect a touch gestures even though it is not in their own Activity. I've looked all over the Internet and haven't found how they can do that.
My main question is how a service can listen in on touch guestures/events just as a regular Activity may receive MotionEvents even though it may not be in the original Activity or context. I'm essentially trying a build an app that will recongize a particular touch gesture from a user regardless which Activity is on top and do something when that gesture is recongized. The touch recongition will be a thread running in the background as a service. | 0 |
8,608,678 | 12/22/2011 19:13:58 | 947,849 | 09/15/2011 22:43:32 | 6 | 0 | changing page title on back button with jQuery Address | Utilizing jQuery Address to enable the browser's back button, I was able to leverage the plugin's event "onExternalChange" to detect when the browser actually hits the back button, so that I could trigger the page title to change on that as well. Unfortunately I can't get it to grab the current section, as it grabs it before it jumps, thus being one off everytime:
$.address.externalChange(function() {
var lastPageTitle = 'Kevin Dare Foundation | ' + $('nav').find('.active').html();
$.address.title(lastPageTitle);
});
link: http://nickdimatteo.com/kjd | javascript | jquery | browser-history | null | null | null | open | changing page title on back button with jQuery Address
===
Utilizing jQuery Address to enable the browser's back button, I was able to leverage the plugin's event "onExternalChange" to detect when the browser actually hits the back button, so that I could trigger the page title to change on that as well. Unfortunately I can't get it to grab the current section, as it grabs it before it jumps, thus being one off everytime:
$.address.externalChange(function() {
var lastPageTitle = 'Kevin Dare Foundation | ' + $('nav').find('.active').html();
$.address.title(lastPageTitle);
});
link: http://nickdimatteo.com/kjd | 0 |
6,331,709 | 06/13/2011 14:22:09 | 478,682 | 10/17/2010 17:54:59 | 35 | 5 | books for learning advanced android | I am well equipped in developing android applications.
Now I want to get the android source and tweak it the way I want. I am just curious if there are books that can help in this regard. All the books that I found on market were about developing the apps on android.
| android | books | null | null | null | 09/20/2011 22:55:29 | not constructive | books for learning advanced android
===
I am well equipped in developing android applications.
Now I want to get the android source and tweak it the way I want. I am just curious if there are books that can help in this regard. All the books that I found on market were about developing the apps on android.
| 4 |
8,224,419 | 11/22/2011 09:20:13 | 1,058,903 | 11/22/2011 01:41:18 | 1 | 0 | .htaccess, Clean URL, unwanted 301 redirect, 1AND1 | I have .htaccess file:
Options +Indexes +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^page/([^/]+)/([^/]+)$ /page.php?ID=$1&Name=$2 [NC]
RewriteRule ^page/([^/]+)/([^/]+)/$ /page.php?ID=$1&Name=$2 [NC]
On my home server MAMP OSX it takes URLS 127.0.0.1/Page/1/2/ and brings the page up nicely. The browser URL does not change and stays clean.
However, on my 1AND1 server, when I type in the address domain, the server returns back a status code of 301 Moved Permanently and response headers of domain/page?ID=1&Name=2. The URL at the top of the browser changes to domain/page?ID=1&Name=2.
How do I stop the redirect from happening on the 1AND1 server? | .htaccess | mod-rewrite | clean-urls | null | null | 11/23/2011 10:35:44 | off topic | .htaccess, Clean URL, unwanted 301 redirect, 1AND1
===
I have .htaccess file:
Options +Indexes +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^page/([^/]+)/([^/]+)$ /page.php?ID=$1&Name=$2 [NC]
RewriteRule ^page/([^/]+)/([^/]+)/$ /page.php?ID=$1&Name=$2 [NC]
On my home server MAMP OSX it takes URLS 127.0.0.1/Page/1/2/ and brings the page up nicely. The browser URL does not change and stays clean.
However, on my 1AND1 server, when I type in the address domain, the server returns back a status code of 301 Moved Permanently and response headers of domain/page?ID=1&Name=2. The URL at the top of the browser changes to domain/page?ID=1&Name=2.
How do I stop the redirect from happening on the 1AND1 server? | 2 |
10,300,694 | 04/24/2012 15:06:14 | 608,667 | 02/08/2011 19:11:21 | 555 | 36 | prevent animation from occurring when initially binding | I have a 2nd stackpanel that appears like a drawer, shown below
______ ______ _____
| | | | |
| main | -> | main | 2nd |
|______| |______|_____|
-->
I have both expand and collapse animations for the drawer. They are bound to a boolean that I update in code.
Everything works fine, except when I initially start my application, the collapse animation gets fired because the initial value is false. Is there a way to bind something without it triggering upon binding? | wpf | animation | binding | expand | collapse | null | open | prevent animation from occurring when initially binding
===
I have a 2nd stackpanel that appears like a drawer, shown below
______ ______ _____
| | | | |
| main | -> | main | 2nd |
|______| |______|_____|
-->
I have both expand and collapse animations for the drawer. They are bound to a boolean that I update in code.
Everything works fine, except when I initially start my application, the collapse animation gets fired because the initial value is false. Is there a way to bind something without it triggering upon binding? | 0 |
2,751,697 | 05/01/2010 22:01:42 | 330,572 | 05/01/2010 21:43:05 | 1 | 0 | Java: I've created a list of word objects to include the name and the frequency, but having trouble updating the frequency. | I'm working on a project which has a dictionary of words and I'm extracting them and adding them to an ArrayList as word objects. I have a class called Word as below.
What I'm wondering is how do I access these word objects to update the frequency? As part of this project, I need to only have one unique word, and increase the frequency of that word by the number of occurrences in the dictionary.
Word(String word)
{
this.word = word;
this.freq = 0;
}
public String getWord() {
return word;
}
public int getFreq() {
return freq;
}
public void setFreq() {
freq = freq + 1;
}
This is how I am adding the word objects to the ArrayList...I think it's ok?
String pattern = "[^a-zA-Z\\s]";
String strippedString = line.replaceAll(pattern, "");
line = strippedString.toLowerCase();
StringTokenizer st = new StringTokenizer(line);
while (st.hasMoreTokens())
{
String newWord = st.nextToken();
word.add(new Word(newWord));
count++;
} | java | object | null | null | null | null | open | Java: I've created a list of word objects to include the name and the frequency, but having trouble updating the frequency.
===
I'm working on a project which has a dictionary of words and I'm extracting them and adding them to an ArrayList as word objects. I have a class called Word as below.
What I'm wondering is how do I access these word objects to update the frequency? As part of this project, I need to only have one unique word, and increase the frequency of that word by the number of occurrences in the dictionary.
Word(String word)
{
this.word = word;
this.freq = 0;
}
public String getWord() {
return word;
}
public int getFreq() {
return freq;
}
public void setFreq() {
freq = freq + 1;
}
This is how I am adding the word objects to the ArrayList...I think it's ok?
String pattern = "[^a-zA-Z\\s]";
String strippedString = line.replaceAll(pattern, "");
line = strippedString.toLowerCase();
StringTokenizer st = new StringTokenizer(line);
while (st.hasMoreTokens())
{
String newWord = st.nextToken();
word.add(new Word(newWord));
count++;
} | 0 |
6,742,764 | 07/19/2011 05:46:37 | 851,331 | 07/19/2011 05:46:37 | 1 | 0 | How to solve unknown host name error in FTP? | I used FTP command in windows then i typed open 192.168.1.15 then it show unknown hos number.
How to solve this problem
| ftp | null | null | null | null | 07/19/2011 06:10:57 | off topic | How to solve unknown host name error in FTP?
===
I used FTP command in windows then i typed open 192.168.1.15 then it show unknown hos number.
How to solve this problem
| 2 |
1,645,544 | 10/29/2009 18:06:44 | 158,017 | 08/17/2009 20:48:38 | 208 | 25 | what could cause a merge cartesian join | I have a super-simple query in a star schema. One fact, two dimensions. I have verified that I am doing the joins properly. But when I execute the query plan, I get a merge cartesian join right before the steps to add the dimensions.
explain plan for
select * from fact f
inner join dim1 d1
on d1.id = f.d1_id
inner join dim2 d2
on d2.id = f.d2_id
where d1.code = 'A' and d2.code = 'B';
If I change to search by the dimension ID instead of the code, my plan is fine - no cartesian.
explain plan for
select * from fact f
inner join dim1 d1
on d1.id = f.d1_id
inner join dim2 d2
on d2.id = f.d2_id
where d1.id= '1' and d2.id = '2';
Any ideas what could cause the cartesian to happen? | oracle | sql | null | null | null | null | open | what could cause a merge cartesian join
===
I have a super-simple query in a star schema. One fact, two dimensions. I have verified that I am doing the joins properly. But when I execute the query plan, I get a merge cartesian join right before the steps to add the dimensions.
explain plan for
select * from fact f
inner join dim1 d1
on d1.id = f.d1_id
inner join dim2 d2
on d2.id = f.d2_id
where d1.code = 'A' and d2.code = 'B';
If I change to search by the dimension ID instead of the code, my plan is fine - no cartesian.
explain plan for
select * from fact f
inner join dim1 d1
on d1.id = f.d1_id
inner join dim2 d2
on d2.id = f.d2_id
where d1.id= '1' and d2.id = '2';
Any ideas what could cause the cartesian to happen? | 0 |
9,215,137 | 02/09/2012 16:53:16 | 1,074,266 | 11/30/2011 21:26:43 | 11 | 0 | Mathematics: Vector Analysis | If given the following question. Does anyone know the best way to answer this, I need to understand the mathematics before I can program it but its baffling me completely.
If A, B,C have position vectors a, b, c relative to an origin O, show that the area of the triangle ABC is 1/2|a ^ b + b ^ c + c ^ a| | math | null | null | null | null | 02/09/2012 22:25:10 | off topic | Mathematics: Vector Analysis
===
If given the following question. Does anyone know the best way to answer this, I need to understand the mathematics before I can program it but its baffling me completely.
If A, B,C have position vectors a, b, c relative to an origin O, show that the area of the triangle ABC is 1/2|a ^ b + b ^ c + c ^ a| | 2 |
7,085,882 | 08/16/2011 22:31:56 | 897,625 | 08/16/2011 22:31:56 | 1 | 0 | Private Chat Program for Web | I have a question on how to create a private chat room , i do have knowledge on php and ajax , so create a simple chat room with no page refresh is not a big deal.
My question starts here , i want a chat room where people can chat personally and no one else can see their chats. I tried a lot in php but seems like a pain in the butt, is there any other way to do it or any one wants to share tips i can follow in php.
Thanks to everyone | php | chatroom | null | null | null | 08/23/2011 01:41:10 | not a real question | Private Chat Program for Web
===
I have a question on how to create a private chat room , i do have knowledge on php and ajax , so create a simple chat room with no page refresh is not a big deal.
My question starts here , i want a chat room where people can chat personally and no one else can see their chats. I tried a lot in php but seems like a pain in the butt, is there any other way to do it or any one wants to share tips i can follow in php.
Thanks to everyone | 1 |
9,064,706 | 01/30/2012 13:35:54 | 471,479 | 10/10/2010 10:45:18 | 840 | 86 | Perl 'convert' command : PDF convertion with bad size/orientation | I'm using the next command in perl:
$mycomm="convert -density 288 doc.pdf -resize 25% doc.png";
system ($mycomm);
The problem comes when i see the output , i see this problem:
![enter image description here][1]
[1]: http://i.stack.imgur.com/D3WzP.png
P.D: I have test -size , -resize , and -geometry params without good output
Any idea? , Thanks for reading :) | perl | pdf | null | null | null | 02/24/2012 19:42:04 | off topic | Perl 'convert' command : PDF convertion with bad size/orientation
===
I'm using the next command in perl:
$mycomm="convert -density 288 doc.pdf -resize 25% doc.png";
system ($mycomm);
The problem comes when i see the output , i see this problem:
![enter image description here][1]
[1]: http://i.stack.imgur.com/D3WzP.png
P.D: I have test -size , -resize , and -geometry params without good output
Any idea? , Thanks for reading :) | 2 |
10,112,929 | 04/11/2012 19:51:50 | 873,740 | 08/02/2011 02:07:36 | 1 | 1 | Flex chart: Access series items at run time | I have a bar chart that I create with one series item in there. It is mapped to an object with field 'url'. Then I have a bunch of objects with 'url' field in an Array Collection. I update the chart's data provider at run time with this Array Collection.
var urlCntSer:BarSeries = new BarSeries();
urlCntSer.xField = "value";
urlCntSer.yField = "url";
urlCntSer.displayName = "URL";
urlCntSer.setStyle("fills", ChartUtil.GRAPH_COLORS_ARR);
urlCountChart.series = [urlCntSer];
My object structure is as follows....
Obj1: {url:www.wsj.com value:10}
obj2: {url:www.theweek.com value:20}
obj3: {url:www.newscorp.com value:5} etc...
So, after updating the chart's dataprovider, I see three bar series items one for each object. Now, I am trying to access the bar series items at runtime as below..
for each(var serObj:Series in seriesArr){
trace("Series obj " + serObj);
}
But it's giving me only one 'series' object with 'yField' url. How can I get hold of all the series items in a graph at run time ? | flex | char | null | null | null | null | open | Flex chart: Access series items at run time
===
I have a bar chart that I create with one series item in there. It is mapped to an object with field 'url'. Then I have a bunch of objects with 'url' field in an Array Collection. I update the chart's data provider at run time with this Array Collection.
var urlCntSer:BarSeries = new BarSeries();
urlCntSer.xField = "value";
urlCntSer.yField = "url";
urlCntSer.displayName = "URL";
urlCntSer.setStyle("fills", ChartUtil.GRAPH_COLORS_ARR);
urlCountChart.series = [urlCntSer];
My object structure is as follows....
Obj1: {url:www.wsj.com value:10}
obj2: {url:www.theweek.com value:20}
obj3: {url:www.newscorp.com value:5} etc...
So, after updating the chart's dataprovider, I see three bar series items one for each object. Now, I am trying to access the bar series items at runtime as below..
for each(var serObj:Series in seriesArr){
trace("Series obj " + serObj);
}
But it's giving me only one 'series' object with 'yField' url. How can I get hold of all the series items in a graph at run time ? | 0 |
10,443,888 | 05/04/2012 06:36:36 | 261,432 | 01/28/2010 23:07:54 | 248 | 14 | Enable Disable RadioButtonList with another RadiobButtonList Selection ASP.NET | Hi I need help with enabling /disabling RadiobuttonList from Client Side
My form looks like this:
![RadioButtonLists][1]
[1]: http://i.stack.imgur.com/x8smv.jpg
1. What I want is by default Yes-Options RadioButtonlist and No-Options Radiobuttonlist shoulsd be disbaled. When user selects YES, YES-Options Radiobutton list shouls get enabled and NO-Options radiobutton list should get disbaled In the same way when selected NO, NO-Options radiobuttonlist should get enabled and YES-Options radiobutton list shouls be disabled.
2. When clicked Save button on bottom, validation should happen. User should select YES or NO from radiobutton list which is on top and then a value should be selected from it's corresponding options. ( When Yes is selected, a value should be selected from YES--Options and Viceversa)
How can I do this ??
Below is my markup
<asp:RadioButtonList ID="rbtnMain" runat="server">
<asp:ListItem Text="YES" Value="1"></asp:ListItem>
<asp:ListItem Text="NO" Value="0"></asp:ListItem>
</asp:RadioButtonList>
<br /><br />
<asp:RadioButtonList ID="rbtnMain" runat="server">
<asp:ListItem Text="YES" Value="1"></asp:ListItem>
<asp:ListItem Text="NO" Value="0"></asp:ListItem>
</asp:RadioButtonList>
<br /><br />
YES -- Options
<asp:RadioButtonList ID="rbtnMainYes" runat="server">
<asp:ListItem Text="Options Yes -1" Value="1"></asp:ListItem>
<asp:ListItem Text="Options Yes -2" Value="2"></asp:ListItem>
<asp:ListItem Text="Options Yes -3" Value="3"></asp:ListItem>
</asp:RadioButtonList>
<br /><br />
NO -- Options
<asp:RadioButtonList ID="rbtnMainNo" runat="server">
<asp:ListItem Text="Options No -1" Value="1"></asp:ListItem>
<asp:ListItem Text="Options No -2" Value="2"></asp:ListItem>
<asp:ListItem Text="Options No -3" Value="3"></asp:ListItem>
</asp:RadioButtonList>
<br /><br />
<asp:Button ID="btnSave" runat="server" Text="Save" />
How can I do this from Clientside ? | asp.net | validation | radiobuttonlist | null | null | null | open | Enable Disable RadioButtonList with another RadiobButtonList Selection ASP.NET
===
Hi I need help with enabling /disabling RadiobuttonList from Client Side
My form looks like this:
![RadioButtonLists][1]
[1]: http://i.stack.imgur.com/x8smv.jpg
1. What I want is by default Yes-Options RadioButtonlist and No-Options Radiobuttonlist shoulsd be disbaled. When user selects YES, YES-Options Radiobutton list shouls get enabled and NO-Options radiobutton list should get disbaled In the same way when selected NO, NO-Options radiobuttonlist should get enabled and YES-Options radiobutton list shouls be disabled.
2. When clicked Save button on bottom, validation should happen. User should select YES or NO from radiobutton list which is on top and then a value should be selected from it's corresponding options. ( When Yes is selected, a value should be selected from YES--Options and Viceversa)
How can I do this ??
Below is my markup
<asp:RadioButtonList ID="rbtnMain" runat="server">
<asp:ListItem Text="YES" Value="1"></asp:ListItem>
<asp:ListItem Text="NO" Value="0"></asp:ListItem>
</asp:RadioButtonList>
<br /><br />
<asp:RadioButtonList ID="rbtnMain" runat="server">
<asp:ListItem Text="YES" Value="1"></asp:ListItem>
<asp:ListItem Text="NO" Value="0"></asp:ListItem>
</asp:RadioButtonList>
<br /><br />
YES -- Options
<asp:RadioButtonList ID="rbtnMainYes" runat="server">
<asp:ListItem Text="Options Yes -1" Value="1"></asp:ListItem>
<asp:ListItem Text="Options Yes -2" Value="2"></asp:ListItem>
<asp:ListItem Text="Options Yes -3" Value="3"></asp:ListItem>
</asp:RadioButtonList>
<br /><br />
NO -- Options
<asp:RadioButtonList ID="rbtnMainNo" runat="server">
<asp:ListItem Text="Options No -1" Value="1"></asp:ListItem>
<asp:ListItem Text="Options No -2" Value="2"></asp:ListItem>
<asp:ListItem Text="Options No -3" Value="3"></asp:ListItem>
</asp:RadioButtonList>
<br /><br />
<asp:Button ID="btnSave" runat="server" Text="Save" />
How can I do this from Clientside ? | 0 |
123,817 | 09/23/2008 20:56:19 | 5,074 | 09/07/2008 17:50:27 | 333 | 16 | Which JMS implementation do you use? | We are using [ActiveMQ][1] as our implementation of choice and we picked it a while ago. It performs well enough for our use right now. Since its been a while, I was wondering what other Java Message Service implementations are in use and why? Surely there are more than a few.
[1]: http://activemq.apache.org/ | java | jms | null | null | null | 05/05/2012 13:35:21 | not constructive | Which JMS implementation do you use?
===
We are using [ActiveMQ][1] as our implementation of choice and we picked it a while ago. It performs well enough for our use right now. Since its been a while, I was wondering what other Java Message Service implementations are in use and why? Surely there are more than a few.
[1]: http://activemq.apache.org/ | 4 |
3,192,655 | 07/07/2010 07:20:14 | 227,892 | 12/09/2009 10:56:13 | 11 | 2 | how and where to use repeater control in C# with example | Hi friends i want to get a data from the database using repeater control in C#:
Am having a button if i click that button then the value should be get from that database and should show in a particular .. Plz friends help me | c# | null | null | null | null | 07/07/2010 14:45:55 | not a real question | how and where to use repeater control in C# with example
===
Hi friends i want to get a data from the database using repeater control in C#:
Am having a button if i click that button then the value should be get from that database and should show in a particular .. Plz friends help me | 1 |
10,398,131 | 05/01/2012 13:13:14 | 508,377 | 11/15/2010 14:47:43 | 1,126 | 7 | What is the best android SDK to start developing andoid application? | There are many android versions, I see the android 2.3 is the most popular one.
What is the best choice, to work on android 2.3 or to work the latest version android 4 or even android 3 ? | android | android-version | null | null | null | 05/02/2012 14:42:17 | not constructive | What is the best android SDK to start developing andoid application?
===
There are many android versions, I see the android 2.3 is the most popular one.
What is the best choice, to work on android 2.3 or to work the latest version android 4 or even android 3 ? | 4 |
10,977,598 | 06/11/2012 09:37:19 | 351,763 | 05/27/2010 09:01:46 | 98 | 2 | Debug Javascript code for IE | I am struggling figuring out why a script works in all browsers except IE. Is there any tool that will allow me to debug? I have already tried to use the built in IE9 developer tools and JsLint but the issue still remains. | javascript | internet-explorer | debugging | null | null | 06/12/2012 09:53:32 | not a real question | Debug Javascript code for IE
===
I am struggling figuring out why a script works in all browsers except IE. Is there any tool that will allow me to debug? I have already tried to use the built in IE9 developer tools and JsLint but the issue still remains. | 1 |
9,603,217 | 03/07/2012 14:24:15 | 242,189 | 01/02/2010 05:39:28 | 368 | 9 | Type providers samples with Visual Studio Beta | Good news, Type Providers now use Microsoft.FSharp.Quotations.**FSharpExpr** instead of **Linq** Expressions
Bad news, many samples do not work anymore, the ones using ProvidedTypes-0.1.fs .....
Do you know where to get a hold on updated samples / ProvidedTypes-0.x.fs ? | visual-studio | f# | visual-studio-11 | type-providers | f#-3.0 | 03/16/2012 03:52:13 | too localized | Type providers samples with Visual Studio Beta
===
Good news, Type Providers now use Microsoft.FSharp.Quotations.**FSharpExpr** instead of **Linq** Expressions
Bad news, many samples do not work anymore, the ones using ProvidedTypes-0.1.fs .....
Do you know where to get a hold on updated samples / ProvidedTypes-0.x.fs ? | 3 |
7,259,193 | 08/31/2011 15:13:15 | 286,044 | 03/04/2010 07:22:53 | 64 | 0 | Could not lauch app by calling a URL from Android Browser | There are many answers in stackoverflow showing how to lauch app from a web browser ,but I am not sure what went wrong with my code, that never seems to be doing the intended.
I am trying to launch my app by a URL from any other app like web browser,initially
my manifest file looks like this
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="http" android:host="ebay.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
And When I typed http://ebay.com in the browser that never started my app.Obviously,how does the browser know about my app?,then i tried the other way around and added another Activity called MyActivity and altered the manifest file as
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MyActivity">
<intent-filter>
<data android:scheme="http" android:host="ebay.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
and tried in my Main Activity <br>
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("http://mycityway.com")));
<br>
Thus producing the intended result.I can also start another application Activity using this method.
<br>
But most of the answers here says that the later is possible.What is the mistake i am doing,I couldn't launch my app from browser.Please guide me. | android | url | browser | android-intent | null | null | open | Could not lauch app by calling a URL from Android Browser
===
There are many answers in stackoverflow showing how to lauch app from a web browser ,but I am not sure what went wrong with my code, that never seems to be doing the intended.
I am trying to launch my app by a URL from any other app like web browser,initially
my manifest file looks like this
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="http" android:host="ebay.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
And When I typed http://ebay.com in the browser that never started my app.Obviously,how does the browser know about my app?,then i tried the other way around and added another Activity called MyActivity and altered the manifest file as
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MyActivity">
<intent-filter>
<data android:scheme="http" android:host="ebay.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
and tried in my Main Activity <br>
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("http://mycityway.com")));
<br>
Thus producing the intended result.I can also start another application Activity using this method.
<br>
But most of the answers here says that the later is possible.What is the mistake i am doing,I couldn't launch my app from browser.Please guide me. | 0 |
1,189,939 | 07/27/2009 18:51:52 | 119,246 | 06/08/2009 14:24:42 | 135 | 46 | Obscure question about MFC and Windows? | Recently for convenience I set up Windows XP to "*Automatically move pointer to the default button in a dialog box*" (via *Control Panel* => *Mouse* => *Pointer Options*).
For most dialog boxes (e.g. Windows file delete confirmation, Outlook empty deleted items) Windows will follow this directive and automatically position my cursor above the default button, but some (notably Firefox, if for example I try to close the browser, Clear Recent Browsing History, or various other tasks) won't move the cursor.
Can anyone with Windows programming expertise clarify whether this is happening because Mozilla "rolled their own" objects rather than deriving from MFC, which is presumably why this action is successful on Windows own and other Microsoft applications? Or is there some reason this occurs which is completely unrelated to how each respective app was built? | obscure | windows | mouse | dialog | mfc | 05/02/2012 15:29:50 | off topic | Obscure question about MFC and Windows?
===
Recently for convenience I set up Windows XP to "*Automatically move pointer to the default button in a dialog box*" (via *Control Panel* => *Mouse* => *Pointer Options*).
For most dialog boxes (e.g. Windows file delete confirmation, Outlook empty deleted items) Windows will follow this directive and automatically position my cursor above the default button, but some (notably Firefox, if for example I try to close the browser, Clear Recent Browsing History, or various other tasks) won't move the cursor.
Can anyone with Windows programming expertise clarify whether this is happening because Mozilla "rolled their own" objects rather than deriving from MFC, which is presumably why this action is successful on Windows own and other Microsoft applications? Or is there some reason this occurs which is completely unrelated to how each respective app was built? | 2 |
7,434,809 | 09/15/2011 17:10:50 | 298,745 | 03/22/2010 03:10:32 | 812 | 34 | FF - Iframe in contentEditable are not loading javascript | I'm currently trying to put together a rich text editor that includes widgets from a different location then the site the rich text editor is on. I'm doing this by providing an Iframe in the content area that is placed at the cursor.
Now the idea behind this instead of providing some kind of placeholder until they finish editing is so they can see what they are talking about while they type.
Now the iframe works perfectly fine in Chrome loads the content as expected, but in Firefox it seems to have disabled javascript in this case (notice none of the script files being downloaded), which is an issue as the widgets are extremely javascript heavy and don't function without it.
I have provided below a JSFiddle showcasing this issue, the site im loading in the iframe is just a javascript game but you will see it doesn't work in firefox but its okay in chrome!
[http://jsfiddle.net/reefbarman/2uYja/2/][1]
Any help is appreciated
[1]: http://jsfiddle.net/reefbarman/2uYja/2/ | javascript | firefox | iframe | null | null | null | open | FF - Iframe in contentEditable are not loading javascript
===
I'm currently trying to put together a rich text editor that includes widgets from a different location then the site the rich text editor is on. I'm doing this by providing an Iframe in the content area that is placed at the cursor.
Now the idea behind this instead of providing some kind of placeholder until they finish editing is so they can see what they are talking about while they type.
Now the iframe works perfectly fine in Chrome loads the content as expected, but in Firefox it seems to have disabled javascript in this case (notice none of the script files being downloaded), which is an issue as the widgets are extremely javascript heavy and don't function without it.
I have provided below a JSFiddle showcasing this issue, the site im loading in the iframe is just a javascript game but you will see it doesn't work in firefox but its okay in chrome!
[http://jsfiddle.net/reefbarman/2uYja/2/][1]
Any help is appreciated
[1]: http://jsfiddle.net/reefbarman/2uYja/2/ | 0 |
388,016 | 12/23/2008 02:32:34 | 45,615 | 12/12/2008 06:26:32 | 64 | 3 | Spinning Background Tasks in Rails | What is the preferred way to create a background task for a Rails application? I've heard of Starling/Workling and the good ol' script/runner, but I am curious which is becoming the defacto way to manage this need?
Thanks! | ruby | ruby-on-rails | unix | null | null | null | open | Spinning Background Tasks in Rails
===
What is the preferred way to create a background task for a Rails application? I've heard of Starling/Workling and the good ol' script/runner, but I am curious which is becoming the defacto way to manage this need?
Thanks! | 0 |
7,270,609 | 09/01/2011 12:55:38 | 923,460 | 09/01/2011 12:41:00 | 1 | 0 | I can't create new bug information in bugzilla | I'm a new user of bugzilla. I config my bugzilla in REHL 5 with MySQL database.
Now, I can visit http://localhost/ to visit my bugzilla homepage. Also I can create new user, visit search page. But when I want to create a new bug, I chose "New", the explorer show that
I can't access to enter_bug.cgi.
What can I do? Where can I find bugzilla's log ?
Is there somebody can help me, thanks very much. | mysql | perl | apache | cgi | bugzilla | 09/01/2011 13:27:06 | off topic | I can't create new bug information in bugzilla
===
I'm a new user of bugzilla. I config my bugzilla in REHL 5 with MySQL database.
Now, I can visit http://localhost/ to visit my bugzilla homepage. Also I can create new user, visit search page. But when I want to create a new bug, I chose "New", the explorer show that
I can't access to enter_bug.cgi.
What can I do? Where can I find bugzilla's log ?
Is there somebody can help me, thanks very much. | 2 |
4,632,183 | 01/08/2011 03:35:46 | 567,734 | 01/08/2011 03:35:46 | 1 | 0 | Qnx vs Android Vs iOS | What advantages would a real time operating system like QNX bring to the smart phone / tablet space vs what android and iOS are doing.
Is really going to be more reliable and secure and at the same time providing great performance and security?
Thanks | android | ios | qnx | null | null | 08/23/2011 13:55:03 | off topic | Qnx vs Android Vs iOS
===
What advantages would a real time operating system like QNX bring to the smart phone / tablet space vs what android and iOS are doing.
Is really going to be more reliable and secure and at the same time providing great performance and security?
Thanks | 2 |
11,029,746 | 06/14/2012 08:54:26 | 1,270,915 | 03/15/2012 07:01:59 | 20 | 6 | getting values from edit text in list in android | i have a list which will have as many rows as user wants.And every particular row will have four edit texts . The user input for no of rows is also in a list as header and the same list has a footer which has a continue button on whose click all the values from the four edit text of all the rows will be retrieved and get stored in database . Now m not able to get the values for all the edit texts on that continue button click . Any suggestions how to do it?? | android | null | null | null | null | 06/14/2012 16:21:19 | not a real question | getting values from edit text in list in android
===
i have a list which will have as many rows as user wants.And every particular row will have four edit texts . The user input for no of rows is also in a list as header and the same list has a footer which has a continue button on whose click all the values from the four edit text of all the rows will be retrieved and get stored in database . Now m not able to get the values for all the edit texts on that continue button click . Any suggestions how to do it?? | 1 |
4,802,613 | 01/26/2011 08:41:32 | 495,989 | 11/03/2010 14:02:21 | 23 | 3 | Inserting a file into mysql DB via CMD | My question is simple I thought, but I did not get it right yet . .
I am having a simple db in mysql server 5.1 -
Which includes a file to be saved in as db format "blob"
How do I save a file in the database ? assuming it is 2 fields, one id - int one blob for the file !?! Is blob right ? Want to save microsoft word and pdf documents !!
I want to insert it via CMD, and struggel, when putting a file path in, it saves the path, but no file !!
E.G. >
INSERT INTO cvtable VALUES("1","???file path???");
Thank you guys for any hints here !! | mysql | cmd | null | null | null | null | open | Inserting a file into mysql DB via CMD
===
My question is simple I thought, but I did not get it right yet . .
I am having a simple db in mysql server 5.1 -
Which includes a file to be saved in as db format "blob"
How do I save a file in the database ? assuming it is 2 fields, one id - int one blob for the file !?! Is blob right ? Want to save microsoft word and pdf documents !!
I want to insert it via CMD, and struggel, when putting a file path in, it saves the path, but no file !!
E.G. >
INSERT INTO cvtable VALUES("1","???file path???");
Thank you guys for any hints here !! | 0 |
9,064,834 | 01/30/2012 13:47:04 | 1,132,612 | 01/05/2012 16:28:22 | 17 | 0 | Windows Server 2008 Stats | You will have to be gentle with me here but I have just been given access to a windows 2008 servers onto which I have uploaded some web pages. Is there anyway that I can get stats from the server about the amounts of hits certain pages are getting.
Sorry for such a basic query but this is the first time I have ever used windows server
Thanks in advance | windows-server-2008 | null | null | null | null | 01/31/2012 12:19:26 | off topic | Windows Server 2008 Stats
===
You will have to be gentle with me here but I have just been given access to a windows 2008 servers onto which I have uploaded some web pages. Is there anyway that I can get stats from the server about the amounts of hits certain pages are getting.
Sorry for such a basic query but this is the first time I have ever used windows server
Thanks in advance | 2 |
9,749,407 | 03/17/2012 10:55:52 | 1,162,201 | 01/21/2012 11:30:08 | 654 | 15 | How to resize cell label as per my text length in iphone UITableView? | I have surfed but not working any of the solution as per my requirement
Let me explain first ! I want to resize my label as per my text string ! I have referred some of stackoverflow questions !
Now look I have first string as **"Hello First,"** This string completely fits with cell.
Now the problem with second string. Second string is **"Hello Second, How are you ? Everythings all right ? Hows all there ?"** This is too long string as per cell content. So I want to make my cell resizable as per string text !!
How can I ? | iphone | objective-c | ios | xcode | null | null | open | How to resize cell label as per my text length in iphone UITableView?
===
I have surfed but not working any of the solution as per my requirement
Let me explain first ! I want to resize my label as per my text string ! I have referred some of stackoverflow questions !
Now look I have first string as **"Hello First,"** This string completely fits with cell.
Now the problem with second string. Second string is **"Hello Second, How are you ? Everythings all right ? Hows all there ?"** This is too long string as per cell content. So I want to make my cell resizable as per string text !!
How can I ? | 0 |
4,598,304 | 01/04/2011 20:53:30 | 337,722 | 05/10/2010 18:14:41 | 89 | 0 | How do we know the outgoing url of the MVC application? | I have an ASP.NET MVC application that has a view called Products.
This Products View has a Left Menu Navigation that is implemented using NavMenuProducts.ascx Partial View. This Menu is implemented using JQuery Treeview so that it has the list of ProductNames as the Parent Node and it is expandable(For Example: 10 Products). Each of these Products have a ChildNode as DocTypeName and it is a hyperlink(For Example: 3 DocTypeNames).
When the user clicks ChildNode Hyperlink all the matching Documents are displayed and is implemented using Ajaxy call. So that the user has better UI experience and the display URL is always http://DocShare .
Now based on the link that the user clicked, how can i know the outgoing url? (For Example: Though it is displaying http://DocShare, the url could be http://DocShare/Products/Product1/Letter
Appreciate your responses.
Thanks | asp.net-mvc | asp.net-mvc-2 | asp.net-ajax | asp.net-mvc-routing | null | null | open | How do we know the outgoing url of the MVC application?
===
I have an ASP.NET MVC application that has a view called Products.
This Products View has a Left Menu Navigation that is implemented using NavMenuProducts.ascx Partial View. This Menu is implemented using JQuery Treeview so that it has the list of ProductNames as the Parent Node and it is expandable(For Example: 10 Products). Each of these Products have a ChildNode as DocTypeName and it is a hyperlink(For Example: 3 DocTypeNames).
When the user clicks ChildNode Hyperlink all the matching Documents are displayed and is implemented using Ajaxy call. So that the user has better UI experience and the display URL is always http://DocShare .
Now based on the link that the user clicked, how can i know the outgoing url? (For Example: Though it is displaying http://DocShare, the url could be http://DocShare/Products/Product1/Letter
Appreciate your responses.
Thanks | 0 |
8,475,159 | 12/12/2011 13:35:21 | 973,485 | 09/30/2011 16:48:13 | 168 | 12 | Removeing an element completely | I want to append a div to an id add some css to it. remove the appended div, then add it again. Problem is when i append it again, it is not back to it's default state. It still has the css that is add from earlier.
Well i tried to illustrate this. But i ran in to another problem, But maybe the cause is the same.
Why is this not working?
http://jsfiddle.net/7CXQn/10/ | javascript | jquery | html | dom | null | 12/14/2011 02:32:47 | too localized | Removeing an element completely
===
I want to append a div to an id add some css to it. remove the appended div, then add it again. Problem is when i append it again, it is not back to it's default state. It still has the css that is add from earlier.
Well i tried to illustrate this. But i ran in to another problem, But maybe the cause is the same.
Why is this not working?
http://jsfiddle.net/7CXQn/10/ | 3 |
7,517,332 | 09/22/2011 15:27:04 | 392,350 | 07/15/2010 06:14:57 | 135 | 6 | Node.js url.parse result back to string | I am trying to do some simple pagination.
To that end, I'm trying to parse the current URL, then produce links to the same query, but with incremented and decremented `page` parameters.
I've tried doing the following, but it produces the same link, without the new `page` parameter.
parts = url.parse req.url, true
parts.query['page'] = 25
console.log "Link: ", url.format(parts)
The [documentation for the URL module][1] seems to suggest that `format` is what I need but I'm doing something wrong.
I know I could iterate and build up the string manually, but I was hoping there's an existing method for this.
[1]: http://nodejs.org/docs/v0.3.1/api/url.html | query | url | node.js | null | null | null | open | Node.js url.parse result back to string
===
I am trying to do some simple pagination.
To that end, I'm trying to parse the current URL, then produce links to the same query, but with incremented and decremented `page` parameters.
I've tried doing the following, but it produces the same link, without the new `page` parameter.
parts = url.parse req.url, true
parts.query['page'] = 25
console.log "Link: ", url.format(parts)
The [documentation for the URL module][1] seems to suggest that `format` is what I need but I'm doing something wrong.
I know I could iterate and build up the string manually, but I was hoping there's an existing method for this.
[1]: http://nodejs.org/docs/v0.3.1/api/url.html | 0 |
5,996,988 | 05/13/2011 19:44:21 | 301,159 | 03/24/2010 19:33:13 | 123 | 0 | how to use proxy in inet in vb6 ? | I'm making a program in vb6.
i;d like to connect using a proxy through inet in vb6. how to o it? please help.
thank you | vb6 | vb | null | null | null | 05/15/2011 06:57:40 | not a real question | how to use proxy in inet in vb6 ?
===
I'm making a program in vb6.
i;d like to connect using a proxy through inet in vb6. how to o it? please help.
thank you | 1 |
6,232,938 | 06/03/2011 21:39:15 | 767,912 | 05/24/2011 14:23:57 | 42 | 0 | Lets talk books... PHP OO? | So, I'd say I have a firm grip on procedural PHP and would like to start looking at the OO style of programming. I've googled and found *enough* tutorials about objects/classes etc demonstrated with chimps, cars, fingers, whatever which just isn't useful. I'd like real-world examples and whilst I've seen other questions here answered with links to real examples, I feel they're still a little too fast-paced.
I'm not saying that I'm incapable of learning OO or that I feel it's too advanced, its just I appreciate the fact that OO is a colossal topic and would rather learn properly from the start, knowing the right standards and practises, learning everything in depth rather than being introduced to advanced features in a few sentences.
If anybody cares to link me to some good online tutorials of this calibre, that would be wonderful - I really wouldn't mind a few book recommendations either (Amazon UK please :)) since usually published author's work is trustworthy.
Also - is it worth me looking at another language to get to grips with the OO mindset? I've read that other languages (say, Java?) that force you to have object orientation are a much better way of learning the ropes?
All input appreciated and I'll be sure to mark the correct answer when I get it. :)
Regards. | php | object | coding-style | null | null | 06/03/2011 21:47:40 | not a real question | Lets talk books... PHP OO?
===
So, I'd say I have a firm grip on procedural PHP and would like to start looking at the OO style of programming. I've googled and found *enough* tutorials about objects/classes etc demonstrated with chimps, cars, fingers, whatever which just isn't useful. I'd like real-world examples and whilst I've seen other questions here answered with links to real examples, I feel they're still a little too fast-paced.
I'm not saying that I'm incapable of learning OO or that I feel it's too advanced, its just I appreciate the fact that OO is a colossal topic and would rather learn properly from the start, knowing the right standards and practises, learning everything in depth rather than being introduced to advanced features in a few sentences.
If anybody cares to link me to some good online tutorials of this calibre, that would be wonderful - I really wouldn't mind a few book recommendations either (Amazon UK please :)) since usually published author's work is trustworthy.
Also - is it worth me looking at another language to get to grips with the OO mindset? I've read that other languages (say, Java?) that force you to have object orientation are a much better way of learning the ropes?
All input appreciated and I'll be sure to mark the correct answer when I get it. :)
Regards. | 1 |
4,287,781 | 11/26/2010 18:38:17 | 521,705 | 11/26/2010 18:38:17 | 1 | 0 | Removing a dictionaryentry from a session index (ASP) | I am brand new to asp, so I think the answer to this should be an easy but I cannot figure out what I am doing wrong. This is a very simple shopping cart exercise I'm doing to learn ASP. I create the session, add things to it, and then on the checkout page should be able to remove items from the cart one by one. If I click remove, the item is removed from the listbox, but not from the session. I know it persists in the session because if I click the link to the shopping page, the listbox on the shopping page will populate with the item I thought that I removed.
I've tried removing it two different ways, and I'm not sure why it isn't working.
note: The dictionary keys are the actual names of the products being used to populate the listboxes. The value entry is the productID# which I don't actually use right now. The listbox on the shopping page is being populated with data from a sqlsource. SelectedItem.Text = product name (whats shown) and SelectedValue = productID (not used).
Thanks so much for your help
//Default (shopping) page
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Create a new collection for the session indexer
ArrayList cart = (ArrayList)Session["scart"];
//Need to initialize a new object in case it's null
if (cart == null)
{
cart = new ArrayList();
Session["scart"] = cart;
}
//Show the shopping car listbox if there are items in it and the
//user returned from the checkout page
else pnlItems.Visible = true;
foreach (DictionaryEntry item in cart)
{
lbItems.Items.Add((string)item.Key);
}
}
//Show the shipping cart listbox containing the items the user just added
if (IsPostBack) pnlItems.Visible = true;
}
private void add_to_cart(string item, int value)
{
//Method to add the selected item to the collection/session indexer
ArrayList cart = (ArrayList)Session["scart"];
cart.Add(new DictionaryEntry(item, value));
}
protected void btnAddItem_Click(object sender, EventArgs e)
{
//Method to send the selected item to the add_to_cart method
string item = ddlProducts.SelectedItem.Text;
lbItems.Items.Add(item);
int value = int.Parse(ddlProducts.SelectedValue);
add_to_cart(item, value);
}
protected void ddlProducts_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void btnCheckOut_Click(object sender, EventArgs e)
{
//Send the user to the checkout page when the button is clicked
Response.Redirect("checkout.aspx", true);
}
}
//CheckoutPage:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Populate the shopping cart on the checkout page with the items in the collection
ArrayList cart = (ArrayList)Session["scart"];
foreach (DictionaryEntry item in cart)
{
lbCheckOut.Items.Add((string)item.Key);
}
}
}
protected void btnKillOrder_Click(object sender, EventArgs e)
{
//Kills the order by ending the session, then returns the user to the shopping page.
Session.Clear();
Response.Redirect("Default.aspx", true);
}
protected void btnRemove_Click(object sender, EventArgs e)
{
//Removes the selected item from the shopping cart listbox and the session indexer
ArrayList cart = (ArrayList)Session["scart"];
cart.Remove(lbCheckOut.SelectedItem.Text);
lbCheckOut.Items.Remove(lbCheckOut.SelectedItem.Text);
Session["scart"] = cart;
//Session.Remove(lbCheckOut.SelectedItem.Text);
}
} | c# | asp | null | null | null | null | open | Removing a dictionaryentry from a session index (ASP)
===
I am brand new to asp, so I think the answer to this should be an easy but I cannot figure out what I am doing wrong. This is a very simple shopping cart exercise I'm doing to learn ASP. I create the session, add things to it, and then on the checkout page should be able to remove items from the cart one by one. If I click remove, the item is removed from the listbox, but not from the session. I know it persists in the session because if I click the link to the shopping page, the listbox on the shopping page will populate with the item I thought that I removed.
I've tried removing it two different ways, and I'm not sure why it isn't working.
note: The dictionary keys are the actual names of the products being used to populate the listboxes. The value entry is the productID# which I don't actually use right now. The listbox on the shopping page is being populated with data from a sqlsource. SelectedItem.Text = product name (whats shown) and SelectedValue = productID (not used).
Thanks so much for your help
//Default (shopping) page
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Create a new collection for the session indexer
ArrayList cart = (ArrayList)Session["scart"];
//Need to initialize a new object in case it's null
if (cart == null)
{
cart = new ArrayList();
Session["scart"] = cart;
}
//Show the shopping car listbox if there are items in it and the
//user returned from the checkout page
else pnlItems.Visible = true;
foreach (DictionaryEntry item in cart)
{
lbItems.Items.Add((string)item.Key);
}
}
//Show the shipping cart listbox containing the items the user just added
if (IsPostBack) pnlItems.Visible = true;
}
private void add_to_cart(string item, int value)
{
//Method to add the selected item to the collection/session indexer
ArrayList cart = (ArrayList)Session["scart"];
cart.Add(new DictionaryEntry(item, value));
}
protected void btnAddItem_Click(object sender, EventArgs e)
{
//Method to send the selected item to the add_to_cart method
string item = ddlProducts.SelectedItem.Text;
lbItems.Items.Add(item);
int value = int.Parse(ddlProducts.SelectedValue);
add_to_cart(item, value);
}
protected void ddlProducts_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void btnCheckOut_Click(object sender, EventArgs e)
{
//Send the user to the checkout page when the button is clicked
Response.Redirect("checkout.aspx", true);
}
}
//CheckoutPage:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Populate the shopping cart on the checkout page with the items in the collection
ArrayList cart = (ArrayList)Session["scart"];
foreach (DictionaryEntry item in cart)
{
lbCheckOut.Items.Add((string)item.Key);
}
}
}
protected void btnKillOrder_Click(object sender, EventArgs e)
{
//Kills the order by ending the session, then returns the user to the shopping page.
Session.Clear();
Response.Redirect("Default.aspx", true);
}
protected void btnRemove_Click(object sender, EventArgs e)
{
//Removes the selected item from the shopping cart listbox and the session indexer
ArrayList cart = (ArrayList)Session["scart"];
cart.Remove(lbCheckOut.SelectedItem.Text);
lbCheckOut.Items.Remove(lbCheckOut.SelectedItem.Text);
Session["scart"] = cart;
//Session.Remove(lbCheckOut.SelectedItem.Text);
}
} | 0 |
11,324,156 | 07/04/2012 07:15:26 | 561,309 | 01/03/2011 13:52:58 | 9,020 | 422 | Prevent xdebug to break at first line of index file | I have xdebug setup with Eclipse PDT. Every time I start a debug session, Eclipse breaks at the first line of my root index.php file. Is it possible to prevent this behavior? | eclipse | xdebug | break | eclipse-pdt | null | null | open | Prevent xdebug to break at first line of index file
===
I have xdebug setup with Eclipse PDT. Every time I start a debug session, Eclipse breaks at the first line of my root index.php file. Is it possible to prevent this behavior? | 0 |
8,651,119 | 12/28/2011 02:02:51 | 866,659 | 07/28/2011 03:38:59 | 142 | 0 | How to send mail each item in page in asp.net mvc c# | In my web page, I list all products and when the user click on each product, It will show the detail of its. Now I want to let the user send mail to their friends about a product detail. How can I implement send mail module in my product detail page?
Thanks you so much. | c# | asp.net | asp.net-mvc | null | null | 01/16/2012 19:46:33 | not a real question | How to send mail each item in page in asp.net mvc c#
===
In my web page, I list all products and when the user click on each product, It will show the detail of its. Now I want to let the user send mail to their friends about a product detail. How can I implement send mail module in my product detail page?
Thanks you so much. | 1 |
9,459,213 | 02/27/2012 02:04:13 | 1,234,632 | 02/27/2012 01:32:21 | 1 | 0 | Google Maps API Bug: 'marginLeft' Object Reference Error | I guess this is the official channel for reporting Google Map API bugs?
This isn't really a question, but here's the bug report, as instructed.
Bug:
In the code file 'main.js', an object reference error occurs when a Google map is dynamically destroyed within the DOM, pointing to the marginLeft property when it no longer exists.
Solution:
Check for the object instance before trying to modify the 'marginLeft' property.
----- Original Message -----
From: "Bryan Garaventa"
To: [email protected]
Sent: Sunday, February 26, 2012 4:48 PM
Subject: Re: marginLeft error in main.js? (Posting denied)
I appreciate the referral, but this is not a technical question. I don't actually have a question, but would like to report a bug against the Maps API, since this is a coding issue within the main.js code file. There isn't anything wrong with my implementation, which worked fine all through 2011, and nothing has changed. So where do bugs get reported?
----- Original Message -----
From: [email protected]
To: Bryan Garaventa
Sent: Sunday, February 26, 2012 1:57 PM
Subject: Re: marginLeft error in main.js? (Posting denied)
Hi,
Thank you for posting your question. However, we've moved our technical Question and Answer channel to Stack Overflow. Please post your question at http://www.stackoverflow.com and tag it with "google-maps-api-3"
Thanks,
Google Maps Developer Relations
----- Original Message -----
From: Bryan Garaventa
To: [email protected]
Sent: Sunday, February 26, 2012 12:24 PM
Subject: marginLeft error in main.js?
Hello,
I just noticed this error today, which didn't occur in the past. I've had the same code up for a year now, and last saw this particular page about a month ago with no script errors. It's sort of strange.
Steps to reproduce:
1. Open http://whatsock.com
2. Click the Live Demo tab. (The Google map is at the bottom, with no errors)
3. Now click the Overview tab (Now the below error is generated)
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/
4.0; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR
2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Sun, 26 Feb 2012 20:22:08 UTC
Message: 'marginLeft' is null or not an object
Line: 27
Char: 56
Code: 0
URI: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/8/1/main.js
| google-maps-api-3 | null | null | null | null | 02/29/2012 00:11:27 | off topic | Google Maps API Bug: 'marginLeft' Object Reference Error
===
I guess this is the official channel for reporting Google Map API bugs?
This isn't really a question, but here's the bug report, as instructed.
Bug:
In the code file 'main.js', an object reference error occurs when a Google map is dynamically destroyed within the DOM, pointing to the marginLeft property when it no longer exists.
Solution:
Check for the object instance before trying to modify the 'marginLeft' property.
----- Original Message -----
From: "Bryan Garaventa"
To: [email protected]
Sent: Sunday, February 26, 2012 4:48 PM
Subject: Re: marginLeft error in main.js? (Posting denied)
I appreciate the referral, but this is not a technical question. I don't actually have a question, but would like to report a bug against the Maps API, since this is a coding issue within the main.js code file. There isn't anything wrong with my implementation, which worked fine all through 2011, and nothing has changed. So where do bugs get reported?
----- Original Message -----
From: [email protected]
To: Bryan Garaventa
Sent: Sunday, February 26, 2012 1:57 PM
Subject: Re: marginLeft error in main.js? (Posting denied)
Hi,
Thank you for posting your question. However, we've moved our technical Question and Answer channel to Stack Overflow. Please post your question at http://www.stackoverflow.com and tag it with "google-maps-api-3"
Thanks,
Google Maps Developer Relations
----- Original Message -----
From: Bryan Garaventa
To: [email protected]
Sent: Sunday, February 26, 2012 12:24 PM
Subject: marginLeft error in main.js?
Hello,
I just noticed this error today, which didn't occur in the past. I've had the same code up for a year now, and last saw this particular page about a month ago with no script errors. It's sort of strange.
Steps to reproduce:
1. Open http://whatsock.com
2. Click the Live Demo tab. (The Google map is at the bottom, with no errors)
3. Now click the Overview tab (Now the below error is generated)
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/
4.0; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR
2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Sun, 26 Feb 2012 20:22:08 UTC
Message: 'marginLeft' is null or not an object
Line: 27
Char: 56
Code: 0
URI: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/8/1/main.js
| 2 |
1,060,279 | 06/29/2009 20:16:02 | 106,716 | 05/13/2009 23:21:37 | 66 | 8 | Iterating through a range of dates in Python | This is working fine, but I'm looking for any feedback on how to do it better. Right now I think it's better than nested loops, but it starts to get Perl-one-linerish when you have a generator in a list comprehension. Any suggestions are welcome.
day_count = (end_date - start_date).days + 1
for single_date in [d for d in (start_date + timedelta(n) for n in range(day_count)) if d <= end_date]:
print strftime("%Y-%m-%d", single_date.timetuple())
Notes:
I'm not actually using this to print; that's just for demo purposes.
The variables start_date and end_date are datetime.date objects, because I don't need the timestamps (they're going to be used to generate a report).
I checked the StackOverflow questions which were similar before posting this, but none were exactly the same.
Sample Output (for a start date of 2009-05-30 and an end date of 2009-06-09):
2009-05-30
2009-05-31
2009-06-01
2009-06-02
2009-06-03
2009-06-04
2009-06-05
2009-06-06
2009-06-07
2009-06-08
2009-06-09
| python | datetime | null | null | null | null | open | Iterating through a range of dates in Python
===
This is working fine, but I'm looking for any feedback on how to do it better. Right now I think it's better than nested loops, but it starts to get Perl-one-linerish when you have a generator in a list comprehension. Any suggestions are welcome.
day_count = (end_date - start_date).days + 1
for single_date in [d for d in (start_date + timedelta(n) for n in range(day_count)) if d <= end_date]:
print strftime("%Y-%m-%d", single_date.timetuple())
Notes:
I'm not actually using this to print; that's just for demo purposes.
The variables start_date and end_date are datetime.date objects, because I don't need the timestamps (they're going to be used to generate a report).
I checked the StackOverflow questions which were similar before posting this, but none were exactly the same.
Sample Output (for a start date of 2009-05-30 and an end date of 2009-06-09):
2009-05-30
2009-05-31
2009-06-01
2009-06-02
2009-06-03
2009-06-04
2009-06-05
2009-06-06
2009-06-07
2009-06-08
2009-06-09
| 0 |
11,564,166 | 07/19/2012 15:28:53 | 92,633 | 04/18/2009 23:29:39 | 1,492 | 40 | Detecting if anonymous pipe is writable - to detect when to end process | So heres the situation (in windows):
* Theres a child process started by the parent, which only has one pipe open, stdout.
* In order for the parent to end the process, it calls pclose
* We can't call read on the pipe to detect if its broken to end the process (because it's a write only pipe, read will always return immediately with an error)
Is there a way to get an event from the pipe when the read end (on the parent) closes? If not, we have to continuously write garbage to the pipe in order to detect when it closes, which is a sub-optimal and wasteful solution.
| windows | process | pipes | null | null | null | open | Detecting if anonymous pipe is writable - to detect when to end process
===
So heres the situation (in windows):
* Theres a child process started by the parent, which only has one pipe open, stdout.
* In order for the parent to end the process, it calls pclose
* We can't call read on the pipe to detect if its broken to end the process (because it's a write only pipe, read will always return immediately with an error)
Is there a way to get an event from the pipe when the read end (on the parent) closes? If not, we have to continuously write garbage to the pipe in order to detect when it closes, which is a sub-optimal and wasteful solution.
| 0 |
6,801,519 | 07/23/2011 15:49:44 | 858,223 | 07/22/2011 15:27:35 | 1 | 0 | please give code for HTTP Live streaming for android2.3.. | http://stackoverflow.com/questions/3595491/is-android-2-2-http-progressive-streaming-http-live-streaming/3595740#3595740
The code provided by the above link for http live streaming only works for android2.2 .I want to know what changes need to be done in this code to make it run on android 2.3...
Or what code can be used common to all androids for http live streaming?
| android | http-live-streaming | null | null | null | 12/19/2011 01:51:36 | not a real question | please give code for HTTP Live streaming for android2.3..
===
http://stackoverflow.com/questions/3595491/is-android-2-2-http-progressive-streaming-http-live-streaming/3595740#3595740
The code provided by the above link for http live streaming only works for android2.2 .I want to know what changes need to be done in this code to make it run on android 2.3...
Or what code can be used common to all androids for http live streaming?
| 1 |
11,116,383 | 06/20/2012 09:18:22 | 1,296,976 | 03/28/2012 02:04:25 | 15 | 0 | What to do after send request to server? | I want to insert data in database, but I used jquery, so cannot simply direct insert in database.I have to use ajax http request..I've already type ajax http request in the js file in my visual studio 2008....then I send request to server..After that what to do?How am I going to insert the data in database? help me!!!
This is my ajax http request:
// Define http_request
var httpRequest;
try
{
httpRequest = new XMLHttpRequest(); // Mozilla, Safari, etc
}
catch(trymicrosoft)
{
try
{
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(oldermicrosoft)
{
try
{
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(failed)
{
httpRequest = false;
}
}
}
if(!httpRequest)
{
alert('Your browser does not support Ajax.');
return false;
}
//===============================
// Action http_request
httpRequest.onreadystatechange = function()
{
if(httpRequest.readyState == 4)
if(httpRequest.status == 200)
alert(httpRequest.responseText);
else
alert('Request Error: '+httpRequest.status);
}
httpRequest.open('GET',document.location.href,true);
httpRequest.send(null);
xmlhttp.open("GET","Default.aspx",true);
xmlhttp.send(); | jquery | null | null | null | null | 06/21/2012 01:33:38 | not a real question | What to do after send request to server?
===
I want to insert data in database, but I used jquery, so cannot simply direct insert in database.I have to use ajax http request..I've already type ajax http request in the js file in my visual studio 2008....then I send request to server..After that what to do?How am I going to insert the data in database? help me!!!
This is my ajax http request:
// Define http_request
var httpRequest;
try
{
httpRequest = new XMLHttpRequest(); // Mozilla, Safari, etc
}
catch(trymicrosoft)
{
try
{
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(oldermicrosoft)
{
try
{
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(failed)
{
httpRequest = false;
}
}
}
if(!httpRequest)
{
alert('Your browser does not support Ajax.');
return false;
}
//===============================
// Action http_request
httpRequest.onreadystatechange = function()
{
if(httpRequest.readyState == 4)
if(httpRequest.status == 200)
alert(httpRequest.responseText);
else
alert('Request Error: '+httpRequest.status);
}
httpRequest.open('GET',document.location.href,true);
httpRequest.send(null);
xmlhttp.open("GET","Default.aspx",true);
xmlhttp.send(); | 1 |
8,495,287 | 12/13/2011 19:52:41 | 1,096,505 | 12/13/2011 19:46:49 | 1 | 0 | build multiple projects using maven in eclipse | I have 7 projects in my local environments and some of them depends on each other. I have build them in particular sequence to ready my development environment. I have to do update dependency and than maven clean install on each project in particular sequence for this. Is there any shortcut to this ? How do I create a run configuration ( or any other way) to build all projects in some sequence ?
-Sunil | eclipse | maven | build | eclipse-plugin | maven-3 | null | open | build multiple projects using maven in eclipse
===
I have 7 projects in my local environments and some of them depends on each other. I have build them in particular sequence to ready my development environment. I have to do update dependency and than maven clean install on each project in particular sequence for this. Is there any shortcut to this ? How do I create a run configuration ( or any other way) to build all projects in some sequence ?
-Sunil | 0 |
7,929,455 | 10/28/2011 12:47:30 | 335,713 | 05/07/2010 18:20:48 | 322 | 8 | Java Whiteboard interview questions on threads | What would be some white board questions related to Threads in java. I have learnt some thread concepts and put them into use.But i would like to know good example questions which i could be asked for
Please provide me with some good thread related questions | java | multithreading | interview-questions | null | null | 10/28/2011 13:44:14 | not a real question | Java Whiteboard interview questions on threads
===
What would be some white board questions related to Threads in java. I have learnt some thread concepts and put them into use.But i would like to know good example questions which i could be asked for
Please provide me with some good thread related questions | 1 |
1,432,924 | 09/16/2009 13:21:51 | 51,197 | 01/03/2009 17:39:24 | 829 | 18 | python: Change the scripts working directory to the script's own directory | I run a python shell from crontab every minute:
* * * * * /home/udi/foo/bar.py
`/home/udi/foo` has some necessary subdirectories, like `/home/udi/foo/log` and `/home/udi/foo/config`, which `/home/udi/foo/bar.py` refers to.
The problem is that `crontab` runs the script from a different working directory, so trying to open `./log/bar.log` fails.
Is there a nice way to tell the script to change the working directory to the script's own directory? I would fancy a solution that would work for any script location, rather than explicitly telling the script where it is. | python | working-directory | null | null | null | null | open | python: Change the scripts working directory to the script's own directory
===
I run a python shell from crontab every minute:
* * * * * /home/udi/foo/bar.py
`/home/udi/foo` has some necessary subdirectories, like `/home/udi/foo/log` and `/home/udi/foo/config`, which `/home/udi/foo/bar.py` refers to.
The problem is that `crontab` runs the script from a different working directory, so trying to open `./log/bar.log` fails.
Is there a nice way to tell the script to change the working directory to the script's own directory? I would fancy a solution that would work for any script location, rather than explicitly telling the script where it is. | 0 |
10,888,729 | 06/04/2012 21:37:20 | 277,480 | 02/20/2010 02:21:24 | 816 | 19 | Changing CSS background color for one link while on that page | Hey all i am trying to only change a background color of a link in my NAV to a different color than all the rest of the nav links only when the user is on that particual page that the link is for.
The code is:
$("#nav li ul li a #changeBG1").css("background-color","red");
And the nav HTML looks a little like this:
<ul id="nav">
<li><a href="index.php">home</a></li>
<li><a href="custHelp.php">who we are</a>
<ul>
<li id="changeBG1"><a href="about.php">about</a></li>
<li id="changeBG2"><a href="help.php">team</a></li>
</ul>
</li>
However, it does not seem to change just that one, it changes ALL of them. I can not seem to find out how to call the ID of **NAV** and then the ID of **changeBG1** so only that one will change.
The Jquery code is:
var url = window.location.href;
url = url.substr(url.lastIndexOf("/") + 1);
$("#theNav").find("a[href='" + url + "']").addClass("theNavsBG");
if (url == 'about.php'){
$("#nav li ul li a #changeBG1").css("background-color","red");
}
Any help would be great! Thanks! | jquery | css | null | null | null | null | open | Changing CSS background color for one link while on that page
===
Hey all i am trying to only change a background color of a link in my NAV to a different color than all the rest of the nav links only when the user is on that particual page that the link is for.
The code is:
$("#nav li ul li a #changeBG1").css("background-color","red");
And the nav HTML looks a little like this:
<ul id="nav">
<li><a href="index.php">home</a></li>
<li><a href="custHelp.php">who we are</a>
<ul>
<li id="changeBG1"><a href="about.php">about</a></li>
<li id="changeBG2"><a href="help.php">team</a></li>
</ul>
</li>
However, it does not seem to change just that one, it changes ALL of them. I can not seem to find out how to call the ID of **NAV** and then the ID of **changeBG1** so only that one will change.
The Jquery code is:
var url = window.location.href;
url = url.substr(url.lastIndexOf("/") + 1);
$("#theNav").find("a[href='" + url + "']").addClass("theNavsBG");
if (url == 'about.php'){
$("#nav li ul li a #changeBG1").css("background-color","red");
}
Any help would be great! Thanks! | 0 |
8,917,227 | 01/18/2012 20:53:00 | 1,157,135 | 01/18/2012 20:43:21 | 1 | 0 | What's a good introductory book on Data Structures in Java | Please recommend a good beginner or intermediate book on Data Structures in Java.
I'd like to buy a printed book, with code in Java | java | data-structures | books | null | null | 01/19/2012 03:26:21 | not constructive | What's a good introductory book on Data Structures in Java
===
Please recommend a good beginner or intermediate book on Data Structures in Java.
I'd like to buy a printed book, with code in Java | 4 |
8,495,454 | 12/13/2011 20:06:55 | 725,417 | 04/26/2011 13:03:57 | 664 | 15 | Introduction or Tutorial to fetching data from own website? | I need to implement a module in my Android application that fetches some textual content (not to be displayed on browser, but to be processed by the app) from my own website.
That textual content will be stored in a database (MySQL?).
My only problem is that I have never done anything like this before (although I am familiar with basic SQL), so I am not sure what would be a good methodical approach to tackle this subject, and I don't even know where to start.
Should I create a MySQL database from scratch and start coding PHP around it?
Is there a framework or wrapper that is already oriented towards communicating with Android applications and lets me focus on the idiosyncrasies of my needs?
What would you recommend as a good starting point?
| android | mysql | null | null | null | 12/13/2011 21:21:37 | not a real question | Introduction or Tutorial to fetching data from own website?
===
I need to implement a module in my Android application that fetches some textual content (not to be displayed on browser, but to be processed by the app) from my own website.
That textual content will be stored in a database (MySQL?).
My only problem is that I have never done anything like this before (although I am familiar with basic SQL), so I am not sure what would be a good methodical approach to tackle this subject, and I don't even know where to start.
Should I create a MySQL database from scratch and start coding PHP around it?
Is there a framework or wrapper that is already oriented towards communicating with Android applications and lets me focus on the idiosyncrasies of my needs?
What would you recommend as a good starting point?
| 1 |
120,022 | 09/23/2008 09:20:39 | 39 | 08/01/2008 12:44:55 | 2,418 | 35 | Tool to monitor HTTP, TCP, etc. Web Service traffic | What's the best tool that you use to monitor Web Service, SOAP, WCF, etc. traffic that's coming and going on the wire? I have seen some tools that made with Java but they seem to be a little crappy. What I want is a tool that sits in the middle as a proxy and does port redirection (which should have configurable listen/redirect ports). Are there any tools work on Windows to do this? | web-services | http | monitoring | tcp | null | 06/07/2012 23:40:01 | not constructive | Tool to monitor HTTP, TCP, etc. Web Service traffic
===
What's the best tool that you use to monitor Web Service, SOAP, WCF, etc. traffic that's coming and going on the wire? I have seen some tools that made with Java but they seem to be a little crappy. What I want is a tool that sits in the middle as a proxy and does port redirection (which should have configurable listen/redirect ports). Are there any tools work on Windows to do this? | 4 |
6,916,723 | 08/02/2011 18:23:02 | 691,552 | 04/04/2011 17:41:25 | 74 | 11 | I'm seeking the canonical, geo-universal link for downloading the latest Internet Explorer | I have a "download the latest browser" page that will appear to many users worldwide, but the only links I can find for downloading IE *either* point to a specific local (eg, en-US) OR a specific version # (eg, IE9). Does anyone know if there's a canonical, locale-generic landing page for IE?
I will keep looking and update if I find the answer. Thanks! | internet-explorer | webbrowser | null | null | null | 08/03/2011 04:29:24 | off topic | I'm seeking the canonical, geo-universal link for downloading the latest Internet Explorer
===
I have a "download the latest browser" page that will appear to many users worldwide, but the only links I can find for downloading IE *either* point to a specific local (eg, en-US) OR a specific version # (eg, IE9). Does anyone know if there's a canonical, locale-generic landing page for IE?
I will keep looking and update if I find the answer. Thanks! | 2 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.