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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,836,739 | 01/29/2011 12:03:23 | 430,803 | 08/25/2010 14:30:08 | 581 | 3 | what does XP stand for ? | Hi all i have heard this question from many person ..window XP........some time i tried to say xp stand for "eXPeriance" i don't know whether this is correct one answer or not.....
So what your point on it. | windows-xp | null | null | null | null | 01/29/2011 12:09:46 | off topic | what does XP stand for ?
===
Hi all i have heard this question from many person ..window XP........some time i tried to say xp stand for "eXPeriance" i don't know whether this is correct one answer or not.....
So what your point on it. | 2 |
7,908,442 | 10/26/2011 20:23:50 | 418,332 | 08/12/2010 11:21:47 | 365 | 4 | Naming convention when submitting separate iPhone and iPad app versions | I have an iPhone app named XXXX-YYYY, now i have built a separate iPad version of this program, not a universal, and my idea was to name it XXXX-iPad-YYY. This was rejected due to the "iPad" piece in the name.
May i ask for some advice how you would name the iPad version as i cannot use the same name as the iPhone version, tried that, and i cannot use "iPad" in the name.
I have checked around a bit but not found anything useful. | iphone | ipad | app-store | name | null | 12/01/2011 00:55:44 | off topic | Naming convention when submitting separate iPhone and iPad app versions
===
I have an iPhone app named XXXX-YYYY, now i have built a separate iPad version of this program, not a universal, and my idea was to name it XXXX-iPad-YYY. This was rejected due to the "iPad" piece in the name.
May i ask for some advice how you would name the iPad version as i cannot use the same name as the iPhone version, tried that, and i cannot use "iPad" in the name.
I have checked around a bit but not found anything useful. | 2 |
4,920,857 | 02/07/2011 11:38:28 | 582,584 | 01/20/2011 07:14:15 | 3 | 1 | Get Number of Lines in UItextView | I am trying to build an app that supports variable size text box depending on the content. The size of the UITextView should increase up to 4 lines and then activate the scrolling.
I am not able to get the number of lines when the text is being entered.
Please suggest me some way to do that. Any sample code snippet would be highly appreciated.
Thanks in advance!! | iphone-sdk-3.0 | uitextview | expandable | uitextviewdelegate | null | null | open | Get Number of Lines in UItextView
===
I am trying to build an app that supports variable size text box depending on the content. The size of the UITextView should increase up to 4 lines and then activate the scrolling.
I am not able to get the number of lines when the text is being entered.
Please suggest me some way to do that. Any sample code snippet would be highly appreciated.
Thanks in advance!! | 0 |
9,271,540 | 02/14/2012 04:06:42 | 805,195 | 06/19/2011 09:12:37 | 9 | 2 | How to restrict a key and its value in a HashMap using generics? | I have a class hierarchy, where, say, class ICommon is at the root. I have separate repositories implementations in order to manipulate objects belonging at each level in this hierarchy.
interface IRepository<T extends ICommon> {
public void createOrUpdate(T toCreate);
}
Now, I want to maintain a Map of classes VS their repositories. Its this part which I can't figure out.
I tried this, which works, but I do not think it is the correct representation.
private Map<Class<? extends ICommon>, IRepository<? extends ICommon>> repoMap = new
HashMap<Class<? extends ICommon>, IRepository<? extends ICommon>>();
Later on, clients call this method to get an appropriate repository instance.
public <T extends ICommon> IRepository<T> getRepository(Class<T> clazz) {
return (IRepository<T>) repoMap.get(clazz);
}
| java | generics | map | hierarchy | null | null | open | How to restrict a key and its value in a HashMap using generics?
===
I have a class hierarchy, where, say, class ICommon is at the root. I have separate repositories implementations in order to manipulate objects belonging at each level in this hierarchy.
interface IRepository<T extends ICommon> {
public void createOrUpdate(T toCreate);
}
Now, I want to maintain a Map of classes VS their repositories. Its this part which I can't figure out.
I tried this, which works, but I do not think it is the correct representation.
private Map<Class<? extends ICommon>, IRepository<? extends ICommon>> repoMap = new
HashMap<Class<? extends ICommon>, IRepository<? extends ICommon>>();
Later on, clients call this method to get an appropriate repository instance.
public <T extends ICommon> IRepository<T> getRepository(Class<T> clazz) {
return (IRepository<T>) repoMap.get(clazz);
}
| 0 |
9,047,452 | 01/28/2012 17:47:02 | 144,213 | 07/24/2009 03:28:34 | 1,754 | 53 | Expose public view of privately scoped Boost.BiMap iterator | I have a privately scoped Boost.BiMap in a class, and I would like to export a public view of part of this map. I have two questions about the following code:
class Object {
typedef bimap<
unordered_set_of<Point>,
unordered_multiset_of<Value>
> PointMap;
PointMap point_map;
public:
??? GetPoints(Value v) {
...
}
The first question is if my method of iteration to get the `Point`'s associated with a `Value` is correct. Below is the code I'm using to iterate over the points. My question is if I am iterating correctly because I found that I had to include the `it->first == value` condition, and wasn't sure if this was required given a better interface that I may not know about.
PointMap::right_const_iterator it;
it = point_map.right.find(value);
while (it != point_map.right.end() && it->first == val) {
/* do stuff */
}
The second question is what is the best way to provide a public view of the GetPoints (the `???` return type above) without exposing the bimap iterator because it seems that the caller would have to know about `point_map.right.end()`. Any efficient structure such as a list of references or a set would work, but I'm a bit lost on how to create the collection.
Thanks! | c++ | boost | iterator | bimap | null | null | open | Expose public view of privately scoped Boost.BiMap iterator
===
I have a privately scoped Boost.BiMap in a class, and I would like to export a public view of part of this map. I have two questions about the following code:
class Object {
typedef bimap<
unordered_set_of<Point>,
unordered_multiset_of<Value>
> PointMap;
PointMap point_map;
public:
??? GetPoints(Value v) {
...
}
The first question is if my method of iteration to get the `Point`'s associated with a `Value` is correct. Below is the code I'm using to iterate over the points. My question is if I am iterating correctly because I found that I had to include the `it->first == value` condition, and wasn't sure if this was required given a better interface that I may not know about.
PointMap::right_const_iterator it;
it = point_map.right.find(value);
while (it != point_map.right.end() && it->first == val) {
/* do stuff */
}
The second question is what is the best way to provide a public view of the GetPoints (the `???` return type above) without exposing the bimap iterator because it seems that the caller would have to know about `point_map.right.end()`. Any efficient structure such as a list of references or a set would work, but I'm a bit lost on how to create the collection.
Thanks! | 0 |
1,548,909 | 10/10/2009 19:56:29 | 179,542 | 09/26/2009 18:15:52 | 1 | 1 | Delphi - most succesful applications developed | Can you name famous, succesfull applications, applications in development, future applications, that are developed with Delphi? The kind of applications that you use everyday is encouraged.
Some of i know:
- Total Commander
- TopStyle
- Skype
- PHP Designer
| delphi | application | famous | null | null | 04/06/2012 17:26:51 | not constructive | Delphi - most succesful applications developed
===
Can you name famous, succesfull applications, applications in development, future applications, that are developed with Delphi? The kind of applications that you use everyday is encouraged.
Some of i know:
- Total Commander
- TopStyle
- Skype
- PHP Designer
| 4 |
6,973,900 | 08/07/2011 16:03:12 | 725,803 | 04/26/2011 17:02:09 | 8 | 0 | Email sending Java, Android | I create the app with button "Sending". When I pressed this button, the app must show me a list of email-clients from mobile. How do I make that? Thank you for, anyway. | java | android | null | null | null | null | open | Email sending Java, Android
===
I create the app with button "Sending". When I pressed this button, the app must show me a list of email-clients from mobile. How do I make that? Thank you for, anyway. | 0 |
7,043,732 | 08/12/2011 17:06:57 | 878,819 | 08/04/2011 14:41:59 | 27 | 0 | How can i use expr function in this case [Linux] | case1
i="text stack"
j="tex"
if [[ $(expr "$i" : "$j") -ne 0 ]];then
echo true
fi
case2
i="text stack"
j="stac"
if [[ $(expr "$i" : "$j") -ne 0 ]];then
echo true
fi
case3
i="text stack"
j="ext"
if [[ $(expr "$i" : "$j") -ne 0 ]];then
echo true
fi
It's work only case1.How can i do for work(echo true) all case? | linux | bash | null | null | null | null | open | How can i use expr function in this case [Linux]
===
case1
i="text stack"
j="tex"
if [[ $(expr "$i" : "$j") -ne 0 ]];then
echo true
fi
case2
i="text stack"
j="stac"
if [[ $(expr "$i" : "$j") -ne 0 ]];then
echo true
fi
case3
i="text stack"
j="ext"
if [[ $(expr "$i" : "$j") -ne 0 ]];then
echo true
fi
It's work only case1.How can i do for work(echo true) all case? | 0 |
2,701,979 | 04/23/2010 21:06:31 | 324,607 | 04/23/2010 21:06:31 | 1 | 0 | Best language for scripting large scale file management | The National Park Service's Natural Sounds Program collects multiple terabytes of data each year measuring soundscapes. In your opinion, what is best available scripting language to manage massive amounts of files and file types? We would like to easily design and run efficient user-friendly scripts to search for and retrieve/create copies of files that may be located in different directories according a single static hierarchy. The OS will most likely be windows. Thanks!
| file | script | language | null | null | 04/06/2012 07:36:17 | not constructive | Best language for scripting large scale file management
===
The National Park Service's Natural Sounds Program collects multiple terabytes of data each year measuring soundscapes. In your opinion, what is best available scripting language to manage massive amounts of files and file types? We would like to easily design and run efficient user-friendly scripts to search for and retrieve/create copies of files that may be located in different directories according a single static hierarchy. The OS will most likely be windows. Thanks!
| 4 |
11,634,042 | 07/24/2012 15:19:47 | 1,546,076 | 07/23/2012 14:13:19 | 1 | 0 | linking database tables | I'm wading deeper and deeper into unknown territory with a project I'm working on. As part of it I have to have a login creation system for both admins and users. Admins need to be able to create products and users need to be able to purchase the products so the details need to be linked to their accounts. I'm a bit lost as to where I should start. There is lots of info out there about sql databases but what is the logic behind what I'm trying to achieve?
I'm currently working with php and html forms to collect the data. | php | html | sql | null | null | 07/27/2012 02:01:23 | not a real question | linking database tables
===
I'm wading deeper and deeper into unknown territory with a project I'm working on. As part of it I have to have a login creation system for both admins and users. Admins need to be able to create products and users need to be able to purchase the products so the details need to be linked to their accounts. I'm a bit lost as to where I should start. There is lots of info out there about sql databases but what is the logic behind what I'm trying to achieve?
I'm currently working with php and html forms to collect the data. | 1 |
8,750,854 | 01/05/2012 22:34:08 | 898,852 | 08/17/2011 14:33:44 | 15 | 0 | Bring task to front on android.intent.action.USER_PRESENT | **BACKGROUND**
I have a task (i.e. app) with multiple activities.
**QUESTION**
How do I bring a task to the front w/o re-ordering the activity stack for that task?
**USER SCENARIO**
When the device boots (i.e. after android.intent.action.BOOT_COMPLETED broadcast is received) my app starts, call this task 1, and displays activity A (code below). As the user interacts with task 1, he/she opens activity B on the stack (activity B is now currently displayed on screen). Next the user taps the home key and opens some other task, call it task 2, then locks the screen. The user unlocks the screen, and the android.intent.action.USER_PRESENT intent is broadcast and received by my app (see manifest snippet below). My executes the startActivity() call in my IntentReceiver class as expected, but instead of just bringing the task to the foreground it creates a new task, call it task 3.
**CHANGES I'VE TRIED**
If I modify or change the Intent.FLAG_ACTIVITY_NEW_TASK to any other intent then I get this error message:
> Calling startActivity() from outside of an Activity context requires
> the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
...so it looks like I have to use Intent.FLAG_ACTIVITY_NEW_TASK.
If I change the main activity's lauchMode to "singleTask" the correct task is brought to the foreground (i.e. no new task is created), but the activity stack is reordered such that activity_A is on top of the stack.
At this point I am at a loss as to how to bring an existing task to the foreground w/o re-ordering the activity stack while listening for the android.intent.action.USER_PRESENT intent, any help would be appreciated.
BTW, This app is being delivered on to a group of employees, not the general public, on company owned android devices.
**CODE SNIPPETS**
To start the app I setup a broadcast receiver in my manifest file.
<application
:
<activity
android:label="@string/app_name"
android:launchMode="singleTop"
android:name=".activities.activity_A" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
:
<receiver
android:enabled="true"
android:name=".utilities.IntentReceiver"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >
<intent-filter >
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
In my BootupReceiver class, I start my main activity...
public class IntentReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent i = new Intent(context, activity_A.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
| android | activity | task | null | null | null | open | Bring task to front on android.intent.action.USER_PRESENT
===
**BACKGROUND**
I have a task (i.e. app) with multiple activities.
**QUESTION**
How do I bring a task to the front w/o re-ordering the activity stack for that task?
**USER SCENARIO**
When the device boots (i.e. after android.intent.action.BOOT_COMPLETED broadcast is received) my app starts, call this task 1, and displays activity A (code below). As the user interacts with task 1, he/she opens activity B on the stack (activity B is now currently displayed on screen). Next the user taps the home key and opens some other task, call it task 2, then locks the screen. The user unlocks the screen, and the android.intent.action.USER_PRESENT intent is broadcast and received by my app (see manifest snippet below). My executes the startActivity() call in my IntentReceiver class as expected, but instead of just bringing the task to the foreground it creates a new task, call it task 3.
**CHANGES I'VE TRIED**
If I modify or change the Intent.FLAG_ACTIVITY_NEW_TASK to any other intent then I get this error message:
> Calling startActivity() from outside of an Activity context requires
> the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
...so it looks like I have to use Intent.FLAG_ACTIVITY_NEW_TASK.
If I change the main activity's lauchMode to "singleTask" the correct task is brought to the foreground (i.e. no new task is created), but the activity stack is reordered such that activity_A is on top of the stack.
At this point I am at a loss as to how to bring an existing task to the foreground w/o re-ordering the activity stack while listening for the android.intent.action.USER_PRESENT intent, any help would be appreciated.
BTW, This app is being delivered on to a group of employees, not the general public, on company owned android devices.
**CODE SNIPPETS**
To start the app I setup a broadcast receiver in my manifest file.
<application
:
<activity
android:label="@string/app_name"
android:launchMode="singleTop"
android:name=".activities.activity_A" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
:
<receiver
android:enabled="true"
android:name=".utilities.IntentReceiver"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >
<intent-filter >
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
In my BootupReceiver class, I start my main activity...
public class IntentReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent i = new Intent(context, activity_A.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
| 0 |
8,864,689 | 01/14/2012 19:15:23 | 350,106 | 07/06/2009 15:35:01 | 4,122 | 350 | Visual Studio C++ 2010 Link Error | I'm getting several `error LNK2019: unresolved external symbol` errors, but they're not due to `dll`s, `lib`s, or OO errors as in every other StackOverflow post about this link error.
Code:
[https://github.com/mcandre/fgdump/tree/master/cachedump][1]
Trace:
1>------ Build started: Project: cachedump, Configuration: Release Win32 ------
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl rc4_crypt(struct rc4_state *,unsigned char *,int)" (?rc4_crypt@@YAXPAUrc4_state@@PAEH@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl rc4_setup(struct rc4_state *,unsigned char *,int)" (?rc4_setup@@YAXPAUrc4_state@@PAEH@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl md5_finish(struct md5_context *,unsigned char * const)" (?md5_finish@@YAXPAUmd5_context@@QAE@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl md5_update(struct md5_context *,unsigned char *,unsigned long)" (?md5_update@@YAXPAUmd5_context@@PAEK@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl md5_starts(struct md5_context *)" (?md5_starts@@YAXPAUmd5_context@@@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>C:\Users\andrew\Desktop\src\fgdump\cachedump\Release\cachedump.exe : fatal error LNK1120: 5 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
abc
[1]: https://github.com/mcandre/fgdump/tree/master/cachedump | c++ | visual-studio | linker | lnk2019 | null | 01/14/2012 20:36:09 | not a real question | Visual Studio C++ 2010 Link Error
===
I'm getting several `error LNK2019: unresolved external symbol` errors, but they're not due to `dll`s, `lib`s, or OO errors as in every other StackOverflow post about this link error.
Code:
[https://github.com/mcandre/fgdump/tree/master/cachedump][1]
Trace:
1>------ Build started: Project: cachedump, Configuration: Release Win32 ------
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl rc4_crypt(struct rc4_state *,unsigned char *,int)" (?rc4_crypt@@YAXPAUrc4_state@@PAEH@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl rc4_setup(struct rc4_state *,unsigned char *,int)" (?rc4_setup@@YAXPAUrc4_state@@PAEH@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl md5_finish(struct md5_context *,unsigned char * const)" (?md5_finish@@YAXPAUmd5_context@@QAE@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl md5_update(struct md5_context *,unsigned char *,unsigned long)" (?md5_update@@YAXPAUmd5_context@@PAEK@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>cachedump.obj : error LNK2019: unresolved external symbol "void __cdecl md5_starts(struct md5_context *)" (?md5_starts@@YAXPAUmd5_context@@@Z) referenced in function "unsigned long __cdecl DumpCache(void)" (?DumpCache@@YAKXZ)
1>C:\Users\andrew\Desktop\src\fgdump\cachedump\Release\cachedump.exe : fatal error LNK1120: 5 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
abc
[1]: https://github.com/mcandre/fgdump/tree/master/cachedump | 1 |
7,791,738 | 10/17/2011 09:24:48 | 998,856 | 10/17/2011 09:12:49 | 1 | 0 | android sensor application with bluetooth communication | I am looking for android programmer who can help me with one android application? I am student and i make projekt about MEMS sensor in mobile phones and i want make application like this http://www.appbrain.com/app/sensor-test-and-plot/com.golborne.android.SensorTest + i need represent data from sensor by object( like 3 axis moving by sensor data), plot in graph and save it to file and make bluetooth communication because i make external device with senstor( accelerometer, gyroscope, magnetic with bluetooth) and i need connect it with this application.
If it possible for you please help me write me mail ddomki@gmail.com wi will make a deal about reward ;)
Thank you very much
Dominik | java | android | android-sensors | null | null | 10/17/2011 22:47:14 | too localized | android sensor application with bluetooth communication
===
I am looking for android programmer who can help me with one android application? I am student and i make projekt about MEMS sensor in mobile phones and i want make application like this http://www.appbrain.com/app/sensor-test-and-plot/com.golborne.android.SensorTest + i need represent data from sensor by object( like 3 axis moving by sensor data), plot in graph and save it to file and make bluetooth communication because i make external device with senstor( accelerometer, gyroscope, magnetic with bluetooth) and i need connect it with this application.
If it possible for you please help me write me mail ddomki@gmail.com wi will make a deal about reward ;)
Thank you very much
Dominik | 3 |
7,683,853 | 10/07/2011 06:42:13 | 637,965 | 02/28/2011 15:56:22 | 575 | 3 | adding a shell script to a configuration file | I'm pretty new to shell scripting and linux in general. Basically, I need to change the configuration file for logging out so that when a user logs out, a certain shell script is run.
Now, I've located the logout configuration file and opened it with vi using this command
$ vi ~/.bash_logout
At this point, I'm experiencing some very weird behavior. When I try to type a character, the cursor jumps around seemingly erratically. What could this be due to? I'm running the latest version of ubuntu.
And once I get that figured out, what's the command to run a .sh file from within this configuration file? | linux | bash | shell | null | null | null | open | adding a shell script to a configuration file
===
I'm pretty new to shell scripting and linux in general. Basically, I need to change the configuration file for logging out so that when a user logs out, a certain shell script is run.
Now, I've located the logout configuration file and opened it with vi using this command
$ vi ~/.bash_logout
At this point, I'm experiencing some very weird behavior. When I try to type a character, the cursor jumps around seemingly erratically. What could this be due to? I'm running the latest version of ubuntu.
And once I get that figured out, what's the command to run a .sh file from within this configuration file? | 0 |
4,711,207 | 01/17/2011 08:23:56 | 233,828 | 12/17/2009 14:21:58 | 34 | 5 | Facebook iframe canvas friend selector | I am in the process of converting my FBML application to iframe as per Facebook's new requirements:
> **No new FBML applications** We will stop allowing new FBML applications, but will continue to support existing FBML tabs and applications. Instead, we recommend using IFrames.
--Facebook Roadmap http://developers.facebook.com/roadmap
Now my application allows you to post your creation to another users wall (or a fan/group page). My old application used the FBML [fb:friend-selector][1] to allow the user to pick a friend, and it would grab the id of them, and post on their wall using FBJS [Facebook.streamPublish][2].
My question is, how do i go about doing the same thing in an iFrame? As far as i am aware, the only option i have is:
- Use FBML in the iframe and have the js SDK turn it into an ugly, hard to access iframe (which also defies the point of sticking it all in a iframe in the 1st place, as it is going to be removed at somepoint?)
- Create my own friend selector using graph api or something. Have yet to see a working example of that in action, makes me wonder if it is possible.
Are there any other options out there, or does anyone have a working custom friend selector in an iFrame?
Thanks in advance :)
[1]: http://developers.facebook.com/docs/reference/fbml/friend-selector/
[2]: http://developers.facebook.com/docs/fbjs/streamPublish | facebook | iframe | fbml | friend | facebook-iframe | null | open | Facebook iframe canvas friend selector
===
I am in the process of converting my FBML application to iframe as per Facebook's new requirements:
> **No new FBML applications** We will stop allowing new FBML applications, but will continue to support existing FBML tabs and applications. Instead, we recommend using IFrames.
--Facebook Roadmap http://developers.facebook.com/roadmap
Now my application allows you to post your creation to another users wall (or a fan/group page). My old application used the FBML [fb:friend-selector][1] to allow the user to pick a friend, and it would grab the id of them, and post on their wall using FBJS [Facebook.streamPublish][2].
My question is, how do i go about doing the same thing in an iFrame? As far as i am aware, the only option i have is:
- Use FBML in the iframe and have the js SDK turn it into an ugly, hard to access iframe (which also defies the point of sticking it all in a iframe in the 1st place, as it is going to be removed at somepoint?)
- Create my own friend selector using graph api or something. Have yet to see a working example of that in action, makes me wonder if it is possible.
Are there any other options out there, or does anyone have a working custom friend selector in an iFrame?
Thanks in advance :)
[1]: http://developers.facebook.com/docs/reference/fbml/friend-selector/
[2]: http://developers.facebook.com/docs/fbjs/streamPublish | 0 |
9,382,493 | 02/21/2012 17:48:40 | 1,137,017 | 01/08/2012 11:52:22 | 63 | 3 | Best way to access MySQL database data in Android via HTTPS Request | Okay, I am developing an Application which requires getting sensitive information from a database and displaying it on an Android device. I have set up a HTTPS connection to the webserver, and used a HTTP GET request to a PHP script on the server. The PHP script connects to the database and prints the appropriate data from the database onto the page. My application then reads the contents of that page and displays it.
Is this an appropriate way to access and retrieve sensitive information, or should I use another method?
Many thanks. | java | android | mysql | database | access | null | open | Best way to access MySQL database data in Android via HTTPS Request
===
Okay, I am developing an Application which requires getting sensitive information from a database and displaying it on an Android device. I have set up a HTTPS connection to the webserver, and used a HTTP GET request to a PHP script on the server. The PHP script connects to the database and prints the appropriate data from the database onto the page. My application then reads the contents of that page and displays it.
Is this an appropriate way to access and retrieve sensitive information, or should I use another method?
Many thanks. | 0 |
11,591,868 | 07/21/2012 11:42:51 | 1,542,601 | 07/21/2012 11:36:22 | 1 | 0 | The Best time to study patterns - now or later? | I have a question related to the process of studying - When should i start reading books about design patterns? I've learned java se and now I'm on a crossroad. Should I study java ee and then get back to patterns, or should I read books about patterns first and then start ee? | java | design-patterns | java-ee | study | study-material | 07/21/2012 11:47:23 | not constructive | The Best time to study patterns - now or later?
===
I have a question related to the process of studying - When should i start reading books about design patterns? I've learned java se and now I'm on a crossroad. Should I study java ee and then get back to patterns, or should I read books about patterns first and then start ee? | 4 |
8,598,602 | 12/22/2011 01:49:08 | 1,106,532 | 12/19/2011 18:49:16 | 339 | 2 | creating a barplot with breaks and densities | I am looking to create a specific kind of barplot and am not expert in ggplot2 or R graphics. The height of each bar corresponds to the density vector below. (The sum of the density vector is one.)
The x-axis breaks for each bar are identified in the breaks vector. The breaks are contiguous. The length of the density and the breaks vector are identical.
To illustrate, the density of the first bar is 0%. The range of the bar corresponds to -Inf to -4.6. The next bar has a height of 2.43e-05 and the x-axis ranges from -4.6 to -4.4. The second bar has height 0 and the x-axis ranges from -4.4 to -4.2 an so on. The last bar has a density of 0% and ranges from 2.6 to Infinity. (Naturally, we would set the xlim of the plot object to min and max of the breaks so that the first and last bars of 0% density are not plotted).
How does one create this barplot in R?
# density for each bar
density = c(0, 2.43053372991266e-05, 0, 2.56155325481663e-05, 7.85928661230842e-05,
6.65974683477407e-05, 0.000191167180262139, 0.000391190191728852,
0.000773173013145194, 0.000994581155560843, 0.00186993240600829,
0.00301523228215973, 0.0024027636820586, 0.00178958309972533,
0.00197757576002083, 0.0037305807759235, 0.00751360121824956,
0.0161785199339545, 0.0285084660871918, 0.0470377898959775, 0.0749650429960432,
0.0995404136577645, 0.122970891515022, 0.137345727945268, 0.129721517357472,
0.111609726931989, 0.0833285279873897, 0.0569221001742823, 0.034426013022441,
0.0191745738000343, 0.00810133792335031, 0.00342022026994395,
0.00120148435128416, 0.000598579482992183, 5.22199596137814e-05,
5.23550471126253e-05, 0)
# breaks for barplot
breaks = c(-4.6, -4.4, -4.2, -4, -3.8, -3.6, -3.4, -3.2, -3, -2.8, -2.6,
-2.4, -2.2, -2, -1.8, -1.6, -1.4, -1.2, -1, -0.8, -0.6, -0.399999999999999,
-0.199999999999999, 0, 0.2, 0.4, 0.600000000000001, 0.800000000000001,
1, 1.2, 1.4, 1.6, 1.8, 2, 2.2, 2.4, 2.6)
| r | graphics | plot | ggplot2 | histogram | null | open | creating a barplot with breaks and densities
===
I am looking to create a specific kind of barplot and am not expert in ggplot2 or R graphics. The height of each bar corresponds to the density vector below. (The sum of the density vector is one.)
The x-axis breaks for each bar are identified in the breaks vector. The breaks are contiguous. The length of the density and the breaks vector are identical.
To illustrate, the density of the first bar is 0%. The range of the bar corresponds to -Inf to -4.6. The next bar has a height of 2.43e-05 and the x-axis ranges from -4.6 to -4.4. The second bar has height 0 and the x-axis ranges from -4.4 to -4.2 an so on. The last bar has a density of 0% and ranges from 2.6 to Infinity. (Naturally, we would set the xlim of the plot object to min and max of the breaks so that the first and last bars of 0% density are not plotted).
How does one create this barplot in R?
# density for each bar
density = c(0, 2.43053372991266e-05, 0, 2.56155325481663e-05, 7.85928661230842e-05,
6.65974683477407e-05, 0.000191167180262139, 0.000391190191728852,
0.000773173013145194, 0.000994581155560843, 0.00186993240600829,
0.00301523228215973, 0.0024027636820586, 0.00178958309972533,
0.00197757576002083, 0.0037305807759235, 0.00751360121824956,
0.0161785199339545, 0.0285084660871918, 0.0470377898959775, 0.0749650429960432,
0.0995404136577645, 0.122970891515022, 0.137345727945268, 0.129721517357472,
0.111609726931989, 0.0833285279873897, 0.0569221001742823, 0.034426013022441,
0.0191745738000343, 0.00810133792335031, 0.00342022026994395,
0.00120148435128416, 0.000598579482992183, 5.22199596137814e-05,
5.23550471126253e-05, 0)
# breaks for barplot
breaks = c(-4.6, -4.4, -4.2, -4, -3.8, -3.6, -3.4, -3.2, -3, -2.8, -2.6,
-2.4, -2.2, -2, -1.8, -1.6, -1.4, -1.2, -1, -0.8, -0.6, -0.399999999999999,
-0.199999999999999, 0, 0.2, 0.4, 0.600000000000001, 0.800000000000001,
1, 1.2, 1.4, 1.6, 1.8, 2, 2.2, 2.4, 2.6)
| 0 |
11,327,881 | 07/04/2012 11:08:20 | 1,134,550 | 01/06/2012 15:07:13 | 75 | 0 | Working with a large data base/data set | I must create an windows form application in c# to work with a very big database. It must find information in the database very quickly. My question is what is the fastest way to work it big databases, to find te information very quickly, any tips, tutorials or articles would help me alot.
Thanks. | c# | sql-server-2008 | null | null | null | 07/09/2012 01:46:59 | not a real question | Working with a large data base/data set
===
I must create an windows form application in c# to work with a very big database. It must find information in the database very quickly. My question is what is the fastest way to work it big databases, to find te information very quickly, any tips, tutorials or articles would help me alot.
Thanks. | 1 |
9,552,986 | 03/04/2012 06:50:48 | 378,698 | 06/29/2010 06:37:10 | 2,100 | 83 | Opensource Mac OSX dock animation in objective-c | I am looking for an open source implementation of the Mac OSX dock animation in objective-c. This is what I am looking for.
![enter image description here][1]
[1]: http://i.stack.imgur.com/jKD2s.png | objective-c | osx | dock | null | null | 03/05/2012 01:18:23 | not a real question | Opensource Mac OSX dock animation in objective-c
===
I am looking for an open source implementation of the Mac OSX dock animation in objective-c. This is what I am looking for.
![enter image description here][1]
[1]: http://i.stack.imgur.com/jKD2s.png | 1 |
6,411,908 | 06/20/2011 13:29:01 | 806,714 | 06/20/2011 13:29:01 | 1 | 0 | Java synchronization options for preventing duplicate orders (file, db locking?) | I have two use cases for placing an order on a website. One is directly submitted from a web front end with a creditcard, and the other is a notification of an external payment from a processor like paypal. In both situations, I need to ensure that the order is only placed one time.
I would like to use the same mechanism for both scenarios if possible, to help with code reuse. In the first use case, the user can submit the order form multiple times and result in different theads trying to place an order. I can use ajax to stop this, but I need a server side solution for certainty. In the second usecase, the notification messages may be sent through in duplicates so I need to protect against that too.
I want the solution to be scalable across a distributed environment, so a memory lock is out of the question. I was looking at saving a unique token to the database to prevent multiple submissions there, but I really don't want to be messing with the existing database transactions. The real solution it seems is to lock on something external like a file in a shared location across jvms.
All orders have a unique long id, so I could use that to synchronize. What would be the best way of doing this? I could potentially create a file per id, or do something fancier with a region of the file. However I don't have much experience with file locking, so if there is a better option I would love to hear it. Any code samples would help very much. | java | file | file-io | synchronization | locking | null | open | Java synchronization options for preventing duplicate orders (file, db locking?)
===
I have two use cases for placing an order on a website. One is directly submitted from a web front end with a creditcard, and the other is a notification of an external payment from a processor like paypal. In both situations, I need to ensure that the order is only placed one time.
I would like to use the same mechanism for both scenarios if possible, to help with code reuse. In the first use case, the user can submit the order form multiple times and result in different theads trying to place an order. I can use ajax to stop this, but I need a server side solution for certainty. In the second usecase, the notification messages may be sent through in duplicates so I need to protect against that too.
I want the solution to be scalable across a distributed environment, so a memory lock is out of the question. I was looking at saving a unique token to the database to prevent multiple submissions there, but I really don't want to be messing with the existing database transactions. The real solution it seems is to lock on something external like a file in a shared location across jvms.
All orders have a unique long id, so I could use that to synchronize. What would be the best way of doing this? I could potentially create a file per id, or do something fancier with a region of the file. However I don't have much experience with file locking, so if there is a better option I would love to hear it. Any code samples would help very much. | 0 |
6,181,773 | 05/31/2011 00:11:28 | 774,677 | 05/28/2011 21:32:33 | 9 | 1 | How to make a decent UI | Please I need help on how to create a nice looking UI. Now I suppose that people looking at this question have an android, if so go to the market. Download a app called, "Quick Settings". It has a great UI and I want to learn how to make mine look as good as that one, if you have any kind of help, it would be appreciated. Thanks. | android | android-layout | android-ui | null | null | 05/31/2011 01:51:59 | not a real question | How to make a decent UI
===
Please I need help on how to create a nice looking UI. Now I suppose that people looking at this question have an android, if so go to the market. Download a app called, "Quick Settings". It has a great UI and I want to learn how to make mine look as good as that one, if you have any kind of help, it would be appreciated. Thanks. | 1 |
4,049,411 | 10/29/2010 06:08:02 | 490,936 | 10/29/2010 06:08:02 | 1 | 0 | using c code to find ratio | is it possible to calculate a ratio using a function in C?? or do i have to do up a formula?? | c | null | null | null | null | 10/29/2010 06:17:47 | not a real question | using c code to find ratio
===
is it possible to calculate a ratio using a function in C?? or do i have to do up a formula?? | 1 |
7,919,560 | 10/27/2011 16:58:49 | 346,348 | 05/20/2010 16:50:04 | 91 | 6 | ASP.Net4.0 web application Eventlogging Error | My application Event logs shows "Either the component that raises this event is not installed on your local computer or the installation is corrupted".
Pasted below is the line of code I use to write to EventLog
Logging.LogWriter.WriteEventLog(Logging.WindowsEvent.ERROR_XXXX_XXXX, "Testing ERROR_XXXX_XXXX.", TrackingGuid);
Pasted below is what I see in the EventViewer -->Application Evet log -->"General" Tab
> The description for Event ID xxxx from source Application Error cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
> If the event originated on another computer, the display information had to be saved with the event.
> The following information was included with the event:
> 2011-10-27 16:27:51.841: TrackingGuid: 1111a70-4618-4ce8-8x5c-9x69e26519c0: Testing ERROR_XXXX_XXXX.
> the message resource is present but the message is not found in the string/message table
I am using : windows 7 ,IIS 7.5 ,VS2010 ultimate,Framework 4.0
Any Idea why this error is
. Please note that the above message says "Either the component that raises this event is not installed on your local computer or the installation is corrupted"
I don't understand which component is missing /corrupted
| c# | asp.net | null | null | null | null | open | ASP.Net4.0 web application Eventlogging Error
===
My application Event logs shows "Either the component that raises this event is not installed on your local computer or the installation is corrupted".
Pasted below is the line of code I use to write to EventLog
Logging.LogWriter.WriteEventLog(Logging.WindowsEvent.ERROR_XXXX_XXXX, "Testing ERROR_XXXX_XXXX.", TrackingGuid);
Pasted below is what I see in the EventViewer -->Application Evet log -->"General" Tab
> The description for Event ID xxxx from source Application Error cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
> If the event originated on another computer, the display information had to be saved with the event.
> The following information was included with the event:
> 2011-10-27 16:27:51.841: TrackingGuid: 1111a70-4618-4ce8-8x5c-9x69e26519c0: Testing ERROR_XXXX_XXXX.
> the message resource is present but the message is not found in the string/message table
I am using : windows 7 ,IIS 7.5 ,VS2010 ultimate,Framework 4.0
Any Idea why this error is
. Please note that the above message says "Either the component that raises this event is not installed on your local computer or the installation is corrupted"
I don't understand which component is missing /corrupted
| 0 |
3,531,874 | 08/20/2010 14:36:04 | 417,798 | 08/11/2010 22:28:18 | 20 | 0 | Is c# code or script? | Let's define languages like c,c++,java as code
Python,PHP as script.
Is c# code or script, and reason? | c# | null | null | null | null | 08/20/2010 14:41:56 | not a real question | Is c# code or script?
===
Let's define languages like c,c++,java as code
Python,PHP as script.
Is c# code or script, and reason? | 1 |
7,376,628 | 09/11/2011 06:12:23 | 938,892 | 09/11/2011 06:12:23 | 1 | 0 | Setting the background color of separate WPF ListBox items | I want to set the background color separately for each item in a WPF ListBox. e.g. If I am adding Widgets to the ListBox, I might set the background color for each one based on the type of widget. This must be done in code (not XAML) as I only know what the items are at run time.
I know how to use ItemContainerStyle to set the style for all items, but how do you do it separately for each item?
| wpf | background | listboxitem | null | null | null | open | Setting the background color of separate WPF ListBox items
===
I want to set the background color separately for each item in a WPF ListBox. e.g. If I am adding Widgets to the ListBox, I might set the background color for each one based on the type of widget. This must be done in code (not XAML) as I only know what the items are at run time.
I know how to use ItemContainerStyle to set the style for all items, but how do you do it separately for each item?
| 0 |
6,993,796 | 08/09/2011 09:08:55 | 885,593 | 08/09/2011 09:08:55 | 1 | 0 | How do download url jad by code, don't use browser of blackberry? | I have url http://m.kimkim.mobi/build/keypad/kimkim.jad, I don't want use browser of Blackberry. How do download application from url by code | blackberry | null | null | null | null | null | open | How do download url jad by code, don't use browser of blackberry?
===
I have url http://m.kimkim.mobi/build/keypad/kimkim.jad, I don't want use browser of Blackberry. How do download application from url by code | 0 |
2,545,872 | 03/30/2010 14:13:00 | 287,783 | 03/06/2010 15:28:55 | 122 | 14 | how can i send data over internet to any specific computer in subnet. | I want to know how I can send or recieve data over internet to/from a computer in subnet
(this is specially in context to PPP users bcoz getting static IP is not so much in practice).
I actually want to create an application which can transfer file between 2 specific computer in WAN.
so what are things I need to know about to do the same..(ex. PRESENT IP or MAC ADDRESS etc..)
PROGRAMATICAL EXPLANATION ALTHOUGH PREFFERED,BUT IS NOT NECCESARY... | c# | sockets | internet | null | null | null | open | how can i send data over internet to any specific computer in subnet.
===
I want to know how I can send or recieve data over internet to/from a computer in subnet
(this is specially in context to PPP users bcoz getting static IP is not so much in practice).
I actually want to create an application which can transfer file between 2 specific computer in WAN.
so what are things I need to know about to do the same..(ex. PRESENT IP or MAC ADDRESS etc..)
PROGRAMATICAL EXPLANATION ALTHOUGH PREFFERED,BUT IS NOT NECCESARY... | 0 |
8,037,244 | 11/07/2011 13:41:32 | 698,843 | 04/08/2011 14:40:10 | 478 | 21 | Plink does not see Pageant | Pageant is started. I can login to server using Putty with blank key field.
This command works fine:
Plink -i c:\path\to\key.ppk git@server.name info
But this one says "Server refused our key" within the same Pageant run, where Putty worked fine:
Plink -agent git@server.name info
And a couple of days ago them all worked nice.
Where to search the problem? | putty | plink | pageant | null | null | 02/27/2012 16:23:53 | off topic | Plink does not see Pageant
===
Pageant is started. I can login to server using Putty with blank key field.
This command works fine:
Plink -i c:\path\to\key.ppk git@server.name info
But this one says "Server refused our key" within the same Pageant run, where Putty worked fine:
Plink -agent git@server.name info
And a couple of days ago them all worked nice.
Where to search the problem? | 2 |
9,266,693 | 02/13/2012 19:29:14 | 195,257 | 10/23/2009 11:35:10 | 170 | 3 | Date in Java not converting to sql properly | My date (s) is not being formatted properly for sql, any ideas why?
public void vDate(String s) {
try{
SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy");
java.util.Date utilDate = (Date)dateFormat.parse(s);
date = new java.sql.Date(utilDate.getTime());
}catch(Exception e){
edate = "Please enter a valid date!";
valid = false;
}
}
date is of type java.sql.Date.
20-03-2012 is converted to 2013-08-03 | java | sql | null | null | null | 02/14/2012 19:50:47 | not a real question | Date in Java not converting to sql properly
===
My date (s) is not being formatted properly for sql, any ideas why?
public void vDate(String s) {
try{
SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy");
java.util.Date utilDate = (Date)dateFormat.parse(s);
date = new java.sql.Date(utilDate.getTime());
}catch(Exception e){
edate = "Please enter a valid date!";
valid = false;
}
}
date is of type java.sql.Date.
20-03-2012 is converted to 2013-08-03 | 1 |
4,259,351 | 11/23/2010 18:14:44 | 41,021 | 11/26/2008 13:16:39 | 3,374 | 99 | What are the most mature platforms as of today? | What are the advanced and mature software platforms that can be used to create commercial software?
And what types of apps are they suited at creating?
We all know the basics:
- .NET makes quick work of Windows apps
- Flash or Silverlight for internet experiences
- MS Office addons for workflow integrated apps
- ASP, Python, ROR or PHP for web apps
What others can you actually consider for a real-world app, for thousands of users? | architecture | platforms | null | null | null | 11/23/2010 20:15:32 | not constructive | What are the most mature platforms as of today?
===
What are the advanced and mature software platforms that can be used to create commercial software?
And what types of apps are they suited at creating?
We all know the basics:
- .NET makes quick work of Windows apps
- Flash or Silverlight for internet experiences
- MS Office addons for workflow integrated apps
- ASP, Python, ROR or PHP for web apps
What others can you actually consider for a real-world app, for thousands of users? | 4 |
913,795 | 05/27/2009 03:23:26 | 109,367 | 05/19/2009 13:19:18 | 177 | 18 | What is the best way to upload user portrait | Stored in the database or file system ?
And I need several different sizes. like 128*128, 96*96, 64*64 and so on.
What is the best way to upload user portrait?
| upload | avatar | null | null | null | null | open | What is the best way to upload user portrait
===
Stored in the database or file system ?
And I need several different sizes. like 128*128, 96*96, 64*64 and so on.
What is the best way to upload user portrait?
| 0 |
314,077 | 11/24/2008 13:01:47 | 40,070 | 11/23/2008 13:15:45 | 28 | 1 | What sort of Business Applications do you build with .NET, Java, PHP or Ruby? | Yesterday I asked a question about [COBOL guy moving to modern platform][1]s and I got some great answers.
I was thinking about what kind of applications get built with java or .net? I know for sure that most corporate portals, blogs, discussion forms, surveys, tracking who registered which course, progress of your e-learning and stuff like that besides online tools such as job sites, reservation systems, dating sites, social networking tools get built using Java/.NET/PHP/RoR. Of course, this site runs on ASP.NET!!
There are certain classes of application such as Logistics, Inventory, HR, Payroll, Travel Accounting that mostly go the way of SAP/Oracle Financials etc. I guess Java applications do some kind of interactions with these applications to get data out; not so sure about .NET. Maybe smaller companies that can't afford SAP goto .NET or Java?
Then there are some applications required to automate common business process, workflow and there are many tools to do them but I'm not sure if Java/.NET comes into picture there.
So, here is my question: what kind of business applications do you normally develop in Java or .NET. Are they used to build the applications I classified under SAP?
[1]: http://stackoverflow.com/questions/312499/a-cobol-programmer-thinking-about-switching-to-the-modern-world | business | application | null | null | null | 05/06/2012 23:18:19 | not constructive | What sort of Business Applications do you build with .NET, Java, PHP or Ruby?
===
Yesterday I asked a question about [COBOL guy moving to modern platform][1]s and I got some great answers.
I was thinking about what kind of applications get built with java or .net? I know for sure that most corporate portals, blogs, discussion forms, surveys, tracking who registered which course, progress of your e-learning and stuff like that besides online tools such as job sites, reservation systems, dating sites, social networking tools get built using Java/.NET/PHP/RoR. Of course, this site runs on ASP.NET!!
There are certain classes of application such as Logistics, Inventory, HR, Payroll, Travel Accounting that mostly go the way of SAP/Oracle Financials etc. I guess Java applications do some kind of interactions with these applications to get data out; not so sure about .NET. Maybe smaller companies that can't afford SAP goto .NET or Java?
Then there are some applications required to automate common business process, workflow and there are many tools to do them but I'm not sure if Java/.NET comes into picture there.
So, here is my question: what kind of business applications do you normally develop in Java or .NET. Are they used to build the applications I classified under SAP?
[1]: http://stackoverflow.com/questions/312499/a-cobol-programmer-thinking-about-switching-to-the-modern-world | 4 |
8,080,895 | 11/10/2011 14:18:30 | 631,619 | 02/24/2011 04:09:55 | 2,533 | 239 | Is there a way to try out sql commands like jsfiddle.net | I'm really impress by jsfiddle.net where we get to try out html/css/js right in front of us.
Does anyone know of a similar set of screens for sql where you could get to try out commands and build tables in a similar 'virtual' environment.
Of course I would like it to support all the different flavors too - mySQL, SQLserver, DB2, Oracle, Postgres, etc. And each of their various versions too please (yes I am smiling and really wishing here). | mysql | sql | oracle | postgresql | jsfiddle | 11/10/2011 22:37:46 | not constructive | Is there a way to try out sql commands like jsfiddle.net
===
I'm really impress by jsfiddle.net where we get to try out html/css/js right in front of us.
Does anyone know of a similar set of screens for sql where you could get to try out commands and build tables in a similar 'virtual' environment.
Of course I would like it to support all the different flavors too - mySQL, SQLserver, DB2, Oracle, Postgres, etc. And each of their various versions too please (yes I am smiling and really wishing here). | 4 |
1,931,126 | 12/18/2009 22:48:05 | 5,987 | 09/11/2008 21:06:49 | 16,566 | 712 | Is it good practice to NULL a pointer after deleting it? | I'll start out by saying, **use smart pointers and you'll never have to worry about this.**
What are the problems with the following code?
Foo * p = new Foo;
// (use p)
delete p;
p = NULL;
This was sparked by [an answer and comments](http://stackoverflow.com/questions/1930459/c-delete-it-deletes-my-objects-but-i-can-still-access-the-data/1930520#1930520) to another question. One comment from [Neil Butterworth](http://stackoverflow.com/users/69307/neil-butterworth) generated a few upvotes:
> Setting pointers to NULL following delete is not universal good practice in C++. There are times when it is a good thing to do, and times when it is pointless and can hide errors.
There are plenty of circumstances where it wouldn't help. But in my experience, it can't hurt. Somebody enlighten me. | c++ | pointers | null | null | null | null | open | Is it good practice to NULL a pointer after deleting it?
===
I'll start out by saying, **use smart pointers and you'll never have to worry about this.**
What are the problems with the following code?
Foo * p = new Foo;
// (use p)
delete p;
p = NULL;
This was sparked by [an answer and comments](http://stackoverflow.com/questions/1930459/c-delete-it-deletes-my-objects-but-i-can-still-access-the-data/1930520#1930520) to another question. One comment from [Neil Butterworth](http://stackoverflow.com/users/69307/neil-butterworth) generated a few upvotes:
> Setting pointers to NULL following delete is not universal good practice in C++. There are times when it is a good thing to do, and times when it is pointless and can hide errors.
There are plenty of circumstances where it wouldn't help. But in my experience, it can't hurt. Somebody enlighten me. | 0 |
1,246,634 | 08/07/2009 19:43:05 | 129,099 | 06/25/2009 21:33:37 | 18 | 0 | php doesnt show error | im working in php on suse11.0 my problem is when i type a wrong syntax or query it doesnt show error only blank page shown at this situtaion
thanks
| php | linux | opensuse | null | null | null | open | php doesnt show error
===
im working in php on suse11.0 my problem is when i type a wrong syntax or query it doesnt show error only blank page shown at this situtaion
thanks
| 0 |
5,405,148 | 03/23/2011 12:20:03 | 261,363 | 01/28/2010 21:05:35 | 160 | 3 | silverlight application wide date | Is there a way to define a application wide format for the dates in Silvelight. So far I've tried to add this code in App_Startup:
CultureInfo culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
culture.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy";
culture.DateTimeFormat.FullDateTimePattern = "dd-MM-yyyy";
culture.DateTimeFormat.ShortTimePattern = "dd-MM-yyyy";
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
But all my date binding don't take this into consideration.
Regards, | silverlight | silverlight-4.0 | null | null | null | null | open | silverlight application wide date
===
Is there a way to define a application wide format for the dates in Silvelight. So far I've tried to add this code in App_Startup:
CultureInfo culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
culture.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy";
culture.DateTimeFormat.FullDateTimePattern = "dd-MM-yyyy";
culture.DateTimeFormat.ShortTimePattern = "dd-MM-yyyy";
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
But all my date binding don't take this into consideration.
Regards, | 0 |
9,998,749 | 04/03/2012 17:58:59 | 1,311,082 | 04/03/2012 17:41:52 | 1 | 0 | Width of DIV dependent on width of window | I have the following problem. I am making this website you can see in the screenshot. It's basically a two rows - three columns Layout with div and css and everything is working fine so far.
But the strippe above the "English"-div is supposed to always go to the right end of the brwoser, but i have no idea how I can achieve this. I've tried javascript but I can't get it to work.
Thanks in advance for your help.
The html code:
http://dl.dropbox.com/u/15902831/index_de.txt
Image of the website
http://dl.dropbox.com/u/15902831/capture.png | html | css | div | width | null | 05/04/2012 17:59:42 | not a real question | Width of DIV dependent on width of window
===
I have the following problem. I am making this website you can see in the screenshot. It's basically a two rows - three columns Layout with div and css and everything is working fine so far.
But the strippe above the "English"-div is supposed to always go to the right end of the brwoser, but i have no idea how I can achieve this. I've tried javascript but I can't get it to work.
Thanks in advance for your help.
The html code:
http://dl.dropbox.com/u/15902831/index_de.txt
Image of the website
http://dl.dropbox.com/u/15902831/capture.png | 1 |
7,865,361 | 10/23/2011 09:34:03 | 366,472 | 06/14/2010 15:42:45 | 450 | 18 | Overlay: semi-transparent border, non-transparent inner area - howto | I would like to create an rectangular overlay where the border is semi-transparent and the inner area is not transparent.
If I tweak the `opacity` parameter of the outer `div` (that contains the border) - than all the internal elements become transparent as well, which is unwanted.
Please advice. | css | html5 | css3 | web-design | null | null | open | Overlay: semi-transparent border, non-transparent inner area - howto
===
I would like to create an rectangular overlay where the border is semi-transparent and the inner area is not transparent.
If I tweak the `opacity` parameter of the outer `div` (that contains the border) - than all the internal elements become transparent as well, which is unwanted.
Please advice. | 0 |
10,872,458 | 06/03/2012 17:32:12 | 950,669 | 09/17/2011 21:08:00 | 1,514 | 104 | Laptop has a full RGB keyboard backlight that I'd like to hook into | How do I go about this? I've never done any sort of hack this close to the metal, and I'm excited to start now.
I'm hoping to do this under linux in whatever language necessary. | bash | hack | null | null | null | 06/04/2012 01:22:21 | off topic | Laptop has a full RGB keyboard backlight that I'd like to hook into
===
How do I go about this? I've never done any sort of hack this close to the metal, and I'm excited to start now.
I'm hoping to do this under linux in whatever language necessary. | 2 |
4,163,711 | 11/12/2010 10:32:49 | 505,367 | 11/12/2010 05:12:37 | 1 | 0 | Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 684] | Release Notes for CakePHP 1.3.5.
Read the changelog
Notice (1024): Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 684]
Notice (1024): Please change the value of 'Security.cipherSeed' in app/config/core.php to a numeric (digits only) seed value specific to your application [CORE\cake\libs\debugger.php, line 688]
Your tmp directory is writable.
The FileEngine is being used for caching. To change the config edit APP/config/core.php
Your database configuration file is present.
Cake is able to connect to the database. | cakephp | null | null | null | null | 04/22/2012 08:54:14 | too localized | Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 684]
===
Release Notes for CakePHP 1.3.5.
Read the changelog
Notice (1024): Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 684]
Notice (1024): Please change the value of 'Security.cipherSeed' in app/config/core.php to a numeric (digits only) seed value specific to your application [CORE\cake\libs\debugger.php, line 688]
Your tmp directory is writable.
The FileEngine is being used for caching. To change the config edit APP/config/core.php
Your database configuration file is present.
Cake is able to connect to the database. | 3 |
11,691,604 | 07/27/2012 16:08:20 | 701,001 | 04/10/2011 16:10:13 | 56 | 7 | Nhibernate memory consumption | I’m using Nhibernate for the first time with MVC3 with telerik, I built a repository and it is working fine, but the thing is when I hosted on a website it consume huge amounts of memories even if accessed by a single user (like a 100MB or so).
even when the user is closing the browser the process is still the same and not releasing memory. | mvc | nhibernate | telerik | null | null | 07/27/2012 21:04:50 | not a real question | Nhibernate memory consumption
===
I’m using Nhibernate for the first time with MVC3 with telerik, I built a repository and it is working fine, but the thing is when I hosted on a website it consume huge amounts of memories even if accessed by a single user (like a 100MB or so).
even when the user is closing the browser the process is still the same and not releasing memory. | 1 |
2,930,979 | 05/28/2010 17:01:30 | 312,586 | 07/13/2009 09:07:11 | 1,902 | 118 | Why do mozilla and webkit prepend -moz- and -webkit- to CSS3 rules? | CSS3 rules bring lots of interesting features.
Take [border-radius][1], for example. The standard says that if you write this rule:
div.rounded-corners {
border-radius: 5px;
}
I should get a 5px border radius.
But neither mozilla nor webkit implement this. However, they implement the same thing, with the same parameters, with a different name (`-moz-border-radius` and `-webkit-border-radius`, respectively).
In order to satisfy as many browsers as possible, you end up with this:
div.rounded-corners {
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
I can see two obvious disadvantages:
* Copy-paste code. This has obvious risks that I will not discuss here.
* The [W3C CSS validator][2] will not validate these rules.
At the same time, I don't see any obvious advantages.
I believe that the people behind mozilla and webkit are more intelligent than myself. There must be some good reasons to have things structured this way. It's just that I can't see them.
So, I must ask you people: why is this?
[1]: http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-border-radius
[2]: http://jigsaw.w3.org/css-validator/ | webkit | css3 | mozilla | w3c | w3c-validation | null | open | Why do mozilla and webkit prepend -moz- and -webkit- to CSS3 rules?
===
CSS3 rules bring lots of interesting features.
Take [border-radius][1], for example. The standard says that if you write this rule:
div.rounded-corners {
border-radius: 5px;
}
I should get a 5px border radius.
But neither mozilla nor webkit implement this. However, they implement the same thing, with the same parameters, with a different name (`-moz-border-radius` and `-webkit-border-radius`, respectively).
In order to satisfy as many browsers as possible, you end up with this:
div.rounded-corners {
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
I can see two obvious disadvantages:
* Copy-paste code. This has obvious risks that I will not discuss here.
* The [W3C CSS validator][2] will not validate these rules.
At the same time, I don't see any obvious advantages.
I believe that the people behind mozilla and webkit are more intelligent than myself. There must be some good reasons to have things structured this way. It's just that I can't see them.
So, I must ask you people: why is this?
[1]: http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-border-radius
[2]: http://jigsaw.w3.org/css-validator/ | 0 |
7,404,736 | 09/13/2011 15:47:30 | 407,468 | 07/31/2010 13:26:41 | 112 | 2 | facebook canvas app inside iframe redirects and signed request | I am building a facebook canvas app and i am using the signed request parameter provided by facebook to check if the user has already authenticated the app. (by checking the presence of user_id field). If the user_id is not set then I redirect the user to a uthorization page (using top.location in javascript).
The problem is that, in my application I need to make internal redirects and then i can´t get signed request anymore.
Possible solutions:
1). Change the way i check if the user has installed the app . Get the current user (not sure if I need signed request anyway). Then use the graph api to check the permissions).
2). allways use client side redirects. (then I can allways get the signed request and it is also provides better navigation to the user because the top url change.) Not sure about the performance compared with iframe redirects.
What is the best option, in your opintion.
PS: I am using PHP SDK / symfony framework and the javascript sdk.
| facebook | iframe | redirect | canvas | application | null | open | facebook canvas app inside iframe redirects and signed request
===
I am building a facebook canvas app and i am using the signed request parameter provided by facebook to check if the user has already authenticated the app. (by checking the presence of user_id field). If the user_id is not set then I redirect the user to a uthorization page (using top.location in javascript).
The problem is that, in my application I need to make internal redirects and then i can´t get signed request anymore.
Possible solutions:
1). Change the way i check if the user has installed the app . Get the current user (not sure if I need signed request anyway). Then use the graph api to check the permissions).
2). allways use client side redirects. (then I can allways get the signed request and it is also provides better navigation to the user because the top url change.) Not sure about the performance compared with iframe redirects.
What is the best option, in your opintion.
PS: I am using PHP SDK / symfony framework and the javascript sdk.
| 0 |
6,455,331 | 06/23/2011 14:04:20 | 717,447 | 03/16/2011 20:38:46 | 53 | 1 | Generate a random number and store it | In Java, how would I generate a random number and then store that number? I've been trying to use this:
Random rnd = new Random(System.currentTimeMillis());
int turn = rnd.nextInt() % 10;
while (turn > 0) {
// ... Do work
}
But it seems like everything the loop runs, turn produces a different number. | java | random | null | null | null | 06/25/2011 23:53:33 | not a real question | Generate a random number and store it
===
In Java, how would I generate a random number and then store that number? I've been trying to use this:
Random rnd = new Random(System.currentTimeMillis());
int turn = rnd.nextInt() % 10;
while (turn > 0) {
// ... Do work
}
But it seems like everything the loop runs, turn produces a different number. | 1 |
8,461,881 | 12/11/2011 04:04:37 | 908,613 | 08/23/2011 22:42:08 | 62 | 5 | How to add items in a ListPicker during OpenReadCompletedEventHandler? | I'm developing a Windows Phone 7 application and I downloaded the Silverlight Toolkit for Windows Phone. Basically my application consumes a REST-based service and then populates the values in the ListPicker.
I was able to add items to this List, but I realize that those items are not displayed in the control.
I'm adding items to the ListPicker during the OpenReadCompletedEventHandler event, but I'm not sure how can "force" this control to draw the layout again.
private void onReadComplete(object sender, OpenReadCompletedEventArgs args)
{
if (args.Error != null)
return;
Stream stm = args.Result;
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(IATAEntry[]));
IATAEntry[] airports = (IATAEntry[])ser.ReadObject(stm);
//Adding items
foreach (IATAEntry airport in airports) {
this.lstOrigen.Items.Add(string.Format("{0}-{1}",airport.code,airport.name ));
}
} | c# | silverlight | mobile | null | null | null | open | How to add items in a ListPicker during OpenReadCompletedEventHandler?
===
I'm developing a Windows Phone 7 application and I downloaded the Silverlight Toolkit for Windows Phone. Basically my application consumes a REST-based service and then populates the values in the ListPicker.
I was able to add items to this List, but I realize that those items are not displayed in the control.
I'm adding items to the ListPicker during the OpenReadCompletedEventHandler event, but I'm not sure how can "force" this control to draw the layout again.
private void onReadComplete(object sender, OpenReadCompletedEventArgs args)
{
if (args.Error != null)
return;
Stream stm = args.Result;
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(IATAEntry[]));
IATAEntry[] airports = (IATAEntry[])ser.ReadObject(stm);
//Adding items
foreach (IATAEntry airport in airports) {
this.lstOrigen.Items.Add(string.Format("{0}-{1}",airport.code,airport.name ));
}
} | 0 |
6,919,354 | 08/02/2011 22:14:43 | 875,562 | 08/02/2011 22:14:43 | 1 | 0 | Good coding: Pointers rather than references? | As I've been coding C/C++ for about a year now, I've tried to learn the preferred ways for writing good OO and C++ code. That means, when coding, I always look for the best ways when implementing something, rather than just typing something and checking if it works.
I've told that in C++ you should use references instead of raw pointers when passing arguments to functions, to make it more safe. So that would be considered as better coding. Although, in many high quality opensource projects(which are C++) they use pointers instead of references. All arguments, returns and stuff are pointers rather than safer references. Even Microsoft's directx uses pointers more than the safer option. I cannot see any benefits by using pointers instead of references, actually I think raw pointers are worse than references(in situations where dynamic alloc isn't needed of course).
So onto my question: why most of the opensource projects use pointers, when there are better ways available? | c++ | pointers | reference | quality | modern-c++ | 08/02/2011 22:35:10 | not constructive | Good coding: Pointers rather than references?
===
As I've been coding C/C++ for about a year now, I've tried to learn the preferred ways for writing good OO and C++ code. That means, when coding, I always look for the best ways when implementing something, rather than just typing something and checking if it works.
I've told that in C++ you should use references instead of raw pointers when passing arguments to functions, to make it more safe. So that would be considered as better coding. Although, in many high quality opensource projects(which are C++) they use pointers instead of references. All arguments, returns and stuff are pointers rather than safer references. Even Microsoft's directx uses pointers more than the safer option. I cannot see any benefits by using pointers instead of references, actually I think raw pointers are worse than references(in situations where dynamic alloc isn't needed of course).
So onto my question: why most of the opensource projects use pointers, when there are better ways available? | 4 |
8,835,187 | 01/12/2012 12:35:43 | 621,609 | 02/17/2011 15:07:57 | 65 | 0 | Send Mails From DataGrid | We have an existing winforms app that (connects to a .NET Remoting Service)has a grid containing list of clients mail need to be sent. It went well until a single user accessed the winform. When multiple users start using the same form to fire mails to their respective clients at the same time..performance issues started creeping up!
For each mail sent, i need to update the row in the grid to green for success & red for failure.
Time being we read one client at a time and make the remoting call since we have to update the row status. Is it possible to send all the clients in one go and will I be able to update the grid individually!
Do you have any suggestions!
| c# | .net | remoting | null | null | null | open | Send Mails From DataGrid
===
We have an existing winforms app that (connects to a .NET Remoting Service)has a grid containing list of clients mail need to be sent. It went well until a single user accessed the winform. When multiple users start using the same form to fire mails to their respective clients at the same time..performance issues started creeping up!
For each mail sent, i need to update the row in the grid to green for success & red for failure.
Time being we read one client at a time and make the remoting call since we have to update the row status. Is it possible to send all the clients in one go and will I be able to update the grid individually!
Do you have any suggestions!
| 0 |
5,296,210 | 03/14/2011 08:19:59 | 657,251 | 03/13/2011 05:34:27 | 10 | 0 | Is the display width actually working in MySQL? | > This optional display width may be
> used by applications to display
> integer values having a width less
> than the width specified for the
> column by left-padding them with
> spaces.
Does the display width actually work in MySQL?
`type` tinyint(2) NOT NULL,
mysql> select length(type) from wp_orders;
+--------------+
| length(type) |
+--------------+
| 1 |
+--------------+
1 row in set (0.00 sec)
It seems to me that `length(type)` should be at least `2` if it's working correctly? | mysql | null | null | null | null | null | open | Is the display width actually working in MySQL?
===
> This optional display width may be
> used by applications to display
> integer values having a width less
> than the width specified for the
> column by left-padding them with
> spaces.
Does the display width actually work in MySQL?
`type` tinyint(2) NOT NULL,
mysql> select length(type) from wp_orders;
+--------------+
| length(type) |
+--------------+
| 1 |
+--------------+
1 row in set (0.00 sec)
It seems to me that `length(type)` should be at least `2` if it's working correctly? | 0 |
8,649,211 | 12/27/2011 20:58:29 | 342,169 | 05/16/2010 00:17:03 | 27 | 0 | php not running on browser | I'm a novice, I installed php5 and apache2 on ubuntu,
I wrote this basic php script
<?
phpinfo();
?>
But, when I open the file in the browser, it only "downloads" the file, it doesn't run the script and show me the necessary info.
Am I missing something? | php | php5 | ubuntu | apache2 | null | 12/28/2011 08:06:07 | off topic | php not running on browser
===
I'm a novice, I installed php5 and apache2 on ubuntu,
I wrote this basic php script
<?
phpinfo();
?>
But, when I open the file in the browser, it only "downloads" the file, it doesn't run the script and show me the necessary info.
Am I missing something? | 2 |
5,350,241 | 03/18/2011 09:43:55 | 270,293 | 02/10/2010 13:13:54 | 185 | 15 | Django: import error that refer to template tags | I'm having a headache with some errors that appear suddenly on an application I'm developing. One time I solved it using complete imports (including the project dir) but this time the error has no sense.
TemplateSyntaxError at /accounts/login/
Caught ViewDoesNotExist while rendering: Could not import e_cidadania.apps.proposals.views. Error was: cannot import name User
And marked code is:
<a href="{% url password_reset %}">{% trans "Lost your password?" %}</a>
The import line at views.py:24
from django.contrib.auth.models import User
I must say, 24h before everything was working fine and no changes were made to the repo.
I've looked the url and the view, both are fine. I've run `manage.py shell` and tested the import, works fine. I did put some markers in the code to test how it was running and the program crashes exactly importing the `User` model in that file (there are lots of imports User in the application and not one of them gave a warning).
Any clues?
**UPDATE:** I forgot to mention that the marked error is in the `userprofile` module, and the proper error is given in the `proposals` module, a module that has **absolutely nothing** to do with userprofile. | django | import | django-templates | null | null | null | open | Django: import error that refer to template tags
===
I'm having a headache with some errors that appear suddenly on an application I'm developing. One time I solved it using complete imports (including the project dir) but this time the error has no sense.
TemplateSyntaxError at /accounts/login/
Caught ViewDoesNotExist while rendering: Could not import e_cidadania.apps.proposals.views. Error was: cannot import name User
And marked code is:
<a href="{% url password_reset %}">{% trans "Lost your password?" %}</a>
The import line at views.py:24
from django.contrib.auth.models import User
I must say, 24h before everything was working fine and no changes were made to the repo.
I've looked the url and the view, both are fine. I've run `manage.py shell` and tested the import, works fine. I did put some markers in the code to test how it was running and the program crashes exactly importing the `User` model in that file (there are lots of imports User in the application and not one of them gave a warning).
Any clues?
**UPDATE:** I forgot to mention that the marked error is in the `userprofile` module, and the proper error is given in the `proposals` module, a module that has **absolutely nothing** to do with userprofile. | 0 |
2,503,345 | 03/23/2010 20:26:25 | 151,841 | 08/06/2009 14:53:49 | 402 | 11 | php, user-uploaded files, version control, and website deployment | I have a website that I regularly update the code to. I keep it in version control. When I want to deploy a new version of the site, I do an export and then symlink the served directory name to the directory of the deployment.
There is a place where users can upload files, and I noticed once that, after I had deployed a new version, the user files were gone! Of course, I hadn't added them to the repository, and since the served site was from an export, they weren't uploaded into a version-controlled directory anyways.
PHP doesn't yet have integrated svn functionality, so I couldn't do much programmatically to user uploaded files. My solution was to create an additional website, files.website.com, which sits in a parallel directory to the served website, and is served out of a directory that is under version control. That way they don't get obliterated when I do an upgrade to the website. From time to time, I manually add uploaded files to the svn project, deleted user-deleted ones, and commit the new version. I'm working on a shell script to run from cron to do this, but it isn't my forte, so it's on the backburner as it's not a pressing need.
Is there a better way to do this? | version-control | deployment | php | svn | architecture | null | open | php, user-uploaded files, version control, and website deployment
===
I have a website that I regularly update the code to. I keep it in version control. When I want to deploy a new version of the site, I do an export and then symlink the served directory name to the directory of the deployment.
There is a place where users can upload files, and I noticed once that, after I had deployed a new version, the user files were gone! Of course, I hadn't added them to the repository, and since the served site was from an export, they weren't uploaded into a version-controlled directory anyways.
PHP doesn't yet have integrated svn functionality, so I couldn't do much programmatically to user uploaded files. My solution was to create an additional website, files.website.com, which sits in a parallel directory to the served website, and is served out of a directory that is under version control. That way they don't get obliterated when I do an upgrade to the website. From time to time, I manually add uploaded files to the svn project, deleted user-deleted ones, and commit the new version. I'm working on a shell script to run from cron to do this, but it isn't my forte, so it's on the backburner as it's not a pressing need.
Is there a better way to do this? | 0 |
5,163,085 | 03/02/2011 03:30:01 | 245,869 | 01/07/2010 19:53:10 | 139 | 9 | Selling open source | I'm thinking about starting an Android application that I'd like to sell on the market, but I'd also like to release it as open source (leaning toward GPLv3, but that's not set in stone). In general, I think this will work fine, but I'm curious of one particular case.
Would an open source license like the GPLv3 allow for another party to take my Android app's source code, repackage it, and put it up on the Android market as a unique app? I know I would own the copyright, but I'm not entirely sure what that entails (like if they change the title, graphics, etc).
My ideal situation is to make a product that people can buy which compensates my time, yet have the source available to foster a community and allow personal tailored versions for those who see fit. This is generally ruined for me, however, if someone comes along and simply repackages my app and puts it on the market for free. | android | open-source | licensing | copyright | selling-software | 03/19/2012 15:14:17 | off topic | Selling open source
===
I'm thinking about starting an Android application that I'd like to sell on the market, but I'd also like to release it as open source (leaning toward GPLv3, but that's not set in stone). In general, I think this will work fine, but I'm curious of one particular case.
Would an open source license like the GPLv3 allow for another party to take my Android app's source code, repackage it, and put it up on the Android market as a unique app? I know I would own the copyright, but I'm not entirely sure what that entails (like if they change the title, graphics, etc).
My ideal situation is to make a product that people can buy which compensates my time, yet have the source available to foster a community and allow personal tailored versions for those who see fit. This is generally ruined for me, however, if someone comes along and simply repackages my app and puts it on the market for free. | 2 |
4,920,700 | 02/07/2011 11:23:29 | 198,053 | 10/28/2009 12:12:51 | 1 | 0 | Daemon creation not working using Win32Utils ruby gem. | This is the code I am trying to run as a service.
require 'rubygems'
require 'win32/daemon'
require 'win32/service'
include Win32
class Daemon
def service_main
while running?
sleep 3
File.open("c:\\test.log", "a"){ |f| f.puts "service is running" }
end
end
def service_stop
exit!
end
end
Daemon.mainloop
This is the code I use to register the Service
require 'rubygems'
require 'win32/service'
include Win32
SERVICE_NAME = 'ruby_sample1'
# Create a new service
ser = Service.create({
:service_name => SERVICE_NAME,
:service_type => Service::WIN32_OWN_PROCESS,
:description => 'A custom service I wrote just for fun',
:start_type => Service::AUTO_START,
:error_control => Service::ERROR_NORMAL,
:binary_path_name => 'c:\\Ruby186\\bin\\ruby.exe -C c:\\temp\\test.rb',
:load_order_group => 'Network',
:dependencies => ['W32Time','Schedule'],
:display_name => SERVICE_NAME
})
After the service is registered I try to start the service from services.msc. I get an error that says "Error 1053: The service did not respond to the start or control request in a timely fashion"
| ruby | winapi | windows-services | null | null | null | open | Daemon creation not working using Win32Utils ruby gem.
===
This is the code I am trying to run as a service.
require 'rubygems'
require 'win32/daemon'
require 'win32/service'
include Win32
class Daemon
def service_main
while running?
sleep 3
File.open("c:\\test.log", "a"){ |f| f.puts "service is running" }
end
end
def service_stop
exit!
end
end
Daemon.mainloop
This is the code I use to register the Service
require 'rubygems'
require 'win32/service'
include Win32
SERVICE_NAME = 'ruby_sample1'
# Create a new service
ser = Service.create({
:service_name => SERVICE_NAME,
:service_type => Service::WIN32_OWN_PROCESS,
:description => 'A custom service I wrote just for fun',
:start_type => Service::AUTO_START,
:error_control => Service::ERROR_NORMAL,
:binary_path_name => 'c:\\Ruby186\\bin\\ruby.exe -C c:\\temp\\test.rb',
:load_order_group => 'Network',
:dependencies => ['W32Time','Schedule'],
:display_name => SERVICE_NAME
})
After the service is registered I try to start the service from services.msc. I get an error that says "Error 1053: The service did not respond to the start or control request in a timely fashion"
| 0 |
4,054,141 | 10/29/2010 16:57:30 | 485,352 | 10/23/2010 22:58:06 | 1 | 0 | How can I create an NSTimer that repeats twice and then stops | I'd like to create an NSTimer that repeats twice then stop, i'd rather not use a loop if that's possible. Any thoughts on how I could do this? | iphone | iphone-sdk-3.0 | iphone-sdk-4.0 | null | null | null | open | How can I create an NSTimer that repeats twice and then stops
===
I'd like to create an NSTimer that repeats twice then stop, i'd rather not use a loop if that's possible. Any thoughts on how I could do this? | 0 |
8,830,463 | 01/12/2012 05:17:58 | 1,144,720 | 01/12/2012 05:07:16 | 1 | 0 | How to Dual boot between Fedora 9 and Ubuntu 11.10 | I have been trying unsuccessfully to dual boot a Fedora 9 and a Ubuntu 11.10 system. The system has a 200GB HD.
I installed Fedora 9 first on /dev/sda1 with a 80 GB partition. Installed the bootloader on 100 MB partition /dev/sda2. Then installed Ubuntu on /dev/sda4. However on booting up Ubuntu 11.10 does not display the bootloader.
Then I tried the other way round. Installed Ubuntu first and then Fedora next. However the Fedora Bootloader does not show Ubuntu as well.
I do understand that Fedora 9 uses the ext3 file system and Ubuntu 11.10 uses the ext4 file sytstem.Also they use different versions of grub. Fedora 9 uses grub1 and ubuntu uses grub2.
Could anyone please help me with the installation process to get this up and running?
| linux | operating-system | null | null | null | 01/12/2012 09:44:14 | off topic | How to Dual boot between Fedora 9 and Ubuntu 11.10
===
I have been trying unsuccessfully to dual boot a Fedora 9 and a Ubuntu 11.10 system. The system has a 200GB HD.
I installed Fedora 9 first on /dev/sda1 with a 80 GB partition. Installed the bootloader on 100 MB partition /dev/sda2. Then installed Ubuntu on /dev/sda4. However on booting up Ubuntu 11.10 does not display the bootloader.
Then I tried the other way round. Installed Ubuntu first and then Fedora next. However the Fedora Bootloader does not show Ubuntu as well.
I do understand that Fedora 9 uses the ext3 file system and Ubuntu 11.10 uses the ext4 file sytstem.Also they use different versions of grub. Fedora 9 uses grub1 and ubuntu uses grub2.
Could anyone please help me with the installation process to get this up and running?
| 2 |
1,518,695 | 10/05/2009 07:38:55 | 110,972 | 05/22/2009 09:01:01 | 107 | 15 | What are some good approaches for outsourcing Rails work? | It seems that a great way to build an app might be to identify all the horizontal / domain-independent pieces that don't already exist in the form of gems, plugins or engines, and commission an outsourcing firm to build those pieces in complete isolation from the rest of the code base.
So let's assume a plugin is a great way.
What do you think are the best acceptance criteria? Are there automated tools available to review code such as rails lint? rcov for test code coverage (what's reasonable? 90% or 95%?).
thanks for any thoughts! | ruby-on-rails | outsourcing | null | null | null | 09/23/2011 05:16:16 | off topic | What are some good approaches for outsourcing Rails work?
===
It seems that a great way to build an app might be to identify all the horizontal / domain-independent pieces that don't already exist in the form of gems, plugins or engines, and commission an outsourcing firm to build those pieces in complete isolation from the rest of the code base.
So let's assume a plugin is a great way.
What do you think are the best acceptance criteria? Are there automated tools available to review code such as rails lint? rcov for test code coverage (what's reasonable? 90% or 95%?).
thanks for any thoughts! | 2 |
9,452,165 | 02/26/2012 10:01:32 | 1,231,229 | 02/24/2012 16:36:50 | 20 | 1 | erase element from vector | I have the following vector passed to a function
void WuManber::Initialize( const vector<const char *> &patterns,
bool bCaseSensitive, bool bIncludeSpecialCharacters, bool bIncludeExtendedAscii )
I want to erase any element that is less in length than 2
I tried the following but it didn't compile even
can you tell me what I am missing here.
for(vector<const char *>::iterator iter = patterns.begin();iter != patterns.end();iter++)
{//my for start
size_t lenPattern = strlen((iter).c_str);
if ( 2 > lenPattern )
patterns.erase(iter);
}//my for end
| vector | elements | erase | null | null | null | open | erase element from vector
===
I have the following vector passed to a function
void WuManber::Initialize( const vector<const char *> &patterns,
bool bCaseSensitive, bool bIncludeSpecialCharacters, bool bIncludeExtendedAscii )
I want to erase any element that is less in length than 2
I tried the following but it didn't compile even
can you tell me what I am missing here.
for(vector<const char *>::iterator iter = patterns.begin();iter != patterns.end();iter++)
{//my for start
size_t lenPattern = strlen((iter).c_str);
if ( 2 > lenPattern )
patterns.erase(iter);
}//my for end
| 0 |
7,938,231 | 10/29/2011 10:12:30 | 434,633 | 08/30/2010 05:00:04 | 68 | 25 | Implementing reputation based system | What was used at Stack Overflow for the implementation of the reputation system in ASP.Net MVC?
Was Role-Provider used? Or some custom implementation?
Thanks
Neelesh | asp.net | asp.net-mvc | stackoverflow | reputation | null | 10/29/2011 11:31:58 | off topic | Implementing reputation based system
===
What was used at Stack Overflow for the implementation of the reputation system in ASP.Net MVC?
Was Role-Provider used? Or some custom implementation?
Thanks
Neelesh | 2 |
7,504,459 | 09/21/2011 18:03:10 | 304,644 | 03/29/2010 22:26:24 | 164 | 7 | Pylons and zombie processes | I'm trying to write an application that will allow the user to start long-running calculation processes (a few hours, for example). To do so, I use Python `Popen()` function. As long as the main Pylons process works fine, everything is good, but when I restart the Pylons process, it doesn't respond to any requests if there are any zombie processes left from the previous paster launch.
What could be the origin or a workaround for this problem?
Thanks in advance, Ivan. | python | pylons | multiprocessing | zombie-process | null | null | open | Pylons and zombie processes
===
I'm trying to write an application that will allow the user to start long-running calculation processes (a few hours, for example). To do so, I use Python `Popen()` function. As long as the main Pylons process works fine, everything is good, but when I restart the Pylons process, it doesn't respond to any requests if there are any zombie processes left from the previous paster launch.
What could be the origin or a workaround for this problem?
Thanks in advance, Ivan. | 0 |
7,308,318 | 09/05/2011 12:47:50 | 630,238 | 02/23/2011 13:08:30 | 150 | 0 | find the id of the next element present in next div-jquery | my form has number of input elements.. when i looping through some elements i need to find the id of the next element which is in next div... the whole code is in **jsfiddle** ..
http://jsfiddle.net/95rqY/61/
thanks in advance
$(":text[name^=sedan]").each(function(i){
var curTxtBox = $(this);
var curId = this.id;
alert(curId);
//var nextTextFieldId = $(this).closest('div').find('.number').attr("id"); // gives undefined
var nextTextFieldId = $('#'+curId).next('div:input[type=text]').attr("id"); // gives undefined
alert(nextTextFieldId )
});
this is not working...nextTextFieldId gives value undefined.
and html is
<div class="first">
<div class="second">
<input type="text" class ="myClass" name="sedan1" id = "sedan1" value="1" />
</div>
<div class="third">
<input type="text" class ="yourClass" name="suv1" id ="suv1" value="2"/>
</div>
</div>
<div class="first">
<div class="second">
<input type="text" class ="myClass" name="sedan2" id = "sedan2" value="3" />
</div>
<div class="third">
<input type="text" class ="yourClass" name="suv2" id = "suv2" value="" />
</div>
</div>
| javascript | jquery | null | null | null | null | open | find the id of the next element present in next div-jquery
===
my form has number of input elements.. when i looping through some elements i need to find the id of the next element which is in next div... the whole code is in **jsfiddle** ..
http://jsfiddle.net/95rqY/61/
thanks in advance
$(":text[name^=sedan]").each(function(i){
var curTxtBox = $(this);
var curId = this.id;
alert(curId);
//var nextTextFieldId = $(this).closest('div').find('.number').attr("id"); // gives undefined
var nextTextFieldId = $('#'+curId).next('div:input[type=text]').attr("id"); // gives undefined
alert(nextTextFieldId )
});
this is not working...nextTextFieldId gives value undefined.
and html is
<div class="first">
<div class="second">
<input type="text" class ="myClass" name="sedan1" id = "sedan1" value="1" />
</div>
<div class="third">
<input type="text" class ="yourClass" name="suv1" id ="suv1" value="2"/>
</div>
</div>
<div class="first">
<div class="second">
<input type="text" class ="myClass" name="sedan2" id = "sedan2" value="3" />
</div>
<div class="third">
<input type="text" class ="yourClass" name="suv2" id = "suv2" value="" />
</div>
</div>
| 0 |
9,998,017 | 04/03/2012 17:05:45 | 286,579 | 03/04/2010 20:02:57 | 539 | 1 | Some issue with bufferedReader | I have a java function as follows:
public HashMap<String, ArrayList<Double>> embedWords(BufferedReader buffR1 {
ArrayList<String > arrayList = new ArrayList<String>();
arrayList = getWords(buffR1);
System.out.println("Word size:"+ arrayList.size());
ArrayList<ArrayList<Double>> arrList = getWordFeature(buffR1);
System.out.println("Size of arrList:embedWords:"+arrList.size());
}
Here , the problem is , the both of the function <code> getWords</code> and <code> getWordFeatures</code> can't give the size value. When i comment function <code>getWords</code> the function <code>getWordFeature</code> returns non-zero value .But when uncommented , the output is as follows:
Word size:15055
Size of arrList:embedWords: 0 | java | function | bufferedreader | null | null | 04/03/2012 23:28:26 | not a real question | Some issue with bufferedReader
===
I have a java function as follows:
public HashMap<String, ArrayList<Double>> embedWords(BufferedReader buffR1 {
ArrayList<String > arrayList = new ArrayList<String>();
arrayList = getWords(buffR1);
System.out.println("Word size:"+ arrayList.size());
ArrayList<ArrayList<Double>> arrList = getWordFeature(buffR1);
System.out.println("Size of arrList:embedWords:"+arrList.size());
}
Here , the problem is , the both of the function <code> getWords</code> and <code> getWordFeatures</code> can't give the size value. When i comment function <code>getWords</code> the function <code>getWordFeature</code> returns non-zero value .But when uncommented , the output is as follows:
Word size:15055
Size of arrList:embedWords: 0 | 1 |
10,007,690 | 04/04/2012 08:43:05 | 1,312,319 | 04/04/2012 08:28:36 | 1 | 0 | I'm puzzled here about awk, sed, etc | I'm trying for a while to work this out with no success so far
I have a command output that I need to chew to make it suitable for further processing
The text I have is:
1/2 [3] (27/03/2012 19:32:54) word word word word 4/5
What I need is to extract only the numbers 1/2 [3] 4/5 so it will look:
1 2 3 4 5
So, basically I was trying to exclude all characters that are not digits, like "/", "[", "]", etc.
I tried awk with FS, tried using regexp, but none of my tries were successful.
I would then add something to it like
first:1 second:2 third:3 .... etc
Please take in mind I'm talking about a file that contains a lot if lines with the same structure, but I already though about using awk to sum every column with
awk '{sum1+=$1 ; sum2+=$2 ;......etc} END {print "first:"sum1 " second:"sum2.....etc}'
But first I will need to extract only the relevant numbers,
The date that is in between "( )" can be omitted completely but they are numbers too, so filtering merely by digits won't be enough as it will match them too
Hope you can help me out
Thanks in advance!
| bash | sed | awk | null | null | null | open | I'm puzzled here about awk, sed, etc
===
I'm trying for a while to work this out with no success so far
I have a command output that I need to chew to make it suitable for further processing
The text I have is:
1/2 [3] (27/03/2012 19:32:54) word word word word 4/5
What I need is to extract only the numbers 1/2 [3] 4/5 so it will look:
1 2 3 4 5
So, basically I was trying to exclude all characters that are not digits, like "/", "[", "]", etc.
I tried awk with FS, tried using regexp, but none of my tries were successful.
I would then add something to it like
first:1 second:2 third:3 .... etc
Please take in mind I'm talking about a file that contains a lot if lines with the same structure, but I already though about using awk to sum every column with
awk '{sum1+=$1 ; sum2+=$2 ;......etc} END {print "first:"sum1 " second:"sum2.....etc}'
But first I will need to extract only the relevant numbers,
The date that is in between "( )" can be omitted completely but they are numbers too, so filtering merely by digits won't be enough as it will match them too
Hope you can help me out
Thanks in advance!
| 0 |
8,179,972 | 11/18/2011 09:02:02 | 1,023,073 | 11/01/2011 04:16:18 | 23 | 0 | How can I get my camera app to take pictures with the sound of my voice? | I am trying to create an app which uses the camera, which I believe I have up and running, I want to be able to say snap and it works as the shutter and takes a picture.... Any help would be great help. | android | application | camera | null | null | 11/18/2011 17:08:14 | not a real question | How can I get my camera app to take pictures with the sound of my voice?
===
I am trying to create an app which uses the camera, which I believe I have up and running, I want to be able to say snap and it works as the shutter and takes a picture.... Any help would be great help. | 1 |
6,143,940 | 05/26/2011 19:24:06 | 771,927 | 05/26/2011 19:24:06 | 1 | 0 | I have a problem with a multiple file upload php/mysql . i do upload fotos but they don´t get to the Database? | i will leave here the code sample :
<?php
if (isset ($_POST["upload"]))
{
class multiplos_uploads
{
var $arquivo;
var $arquivo_nome;
var $arquivo_size;
var $limite="900000";// ou 200kb x 1024b =204800k
var $arquivo_diretorio;
var $mover_arquivo;
var $arquivo_temporario = "";
var $num = "";
var $all_images = "";
var $erro = 0;
function envia()
{
$aux = array();
for($this->num = 0; $this->num < sizeof($this->arquivo=$_FILES["img"]); $this->num++)
{
$this->arquivo=$_FILES["img"];
$this->arquivo_nome=$this->arquivo["name"][$this->num];
$this->arquivo_temporario=$this->arquivo["tmp_name"][$this->num];
$this->arquivo_size=$this->arquivo["size"][$this->num];
$this->arquivo_tipo=$this->arquivo["type"][$this->num];
$this->limite[$this->num];
//verifica se existe algum arquivo selecionado
if($this->arquivo_nome==false){
$this->erro = 1;
}
//verifica tamanho do arquivo
if($this->arquivo_size>$this->limite){
$this->erro = 2;
}
//verifica o tipo de arquivo
if(!preg_match("^[image]+[/]+[jpg,png,gif]^",$this->arquivo_tipo)) {
$this->erro = 3;
}
// upload e registro de pasta
$this->arquivo_diretorio = "uploads/".$this->arquivo_nome;
// verifica se arquivo ja existe no diretorio
if(file_exists($this->arquivo_diretorio)) {
$this->erro = 4;
}
else {
$this->erro = 0;
$this->mover_arquivo= move_uploaded_file($this->arquivo_temporario, $this->arquivo_diretorio);
array_push($aux,$this->arquivo_diretorio);
}
}
$this->all_images = $aux;
}
}
$multiplos_uploads=new multiplos_uploads();//objeto instanciado
$multiplos_uploads->envia();
if($multiplos_uploads->erro==0)
{
#todas as imagens
$images = $multiplos_uploads->all_images;
foreach($images as $img)
{
$sql = mysql_query("INSERT INTO projectoimagens (projecto_fk,image) VALUES (%s,'$img')"),
GetSQLValueString($_POST['idz'], "int"));
}
}
}
?> | php | mysql | html | null | null | 07/16/2012 15:27:36 | too localized | I have a problem with a multiple file upload php/mysql . i do upload fotos but they don´t get to the Database?
===
i will leave here the code sample :
<?php
if (isset ($_POST["upload"]))
{
class multiplos_uploads
{
var $arquivo;
var $arquivo_nome;
var $arquivo_size;
var $limite="900000";// ou 200kb x 1024b =204800k
var $arquivo_diretorio;
var $mover_arquivo;
var $arquivo_temporario = "";
var $num = "";
var $all_images = "";
var $erro = 0;
function envia()
{
$aux = array();
for($this->num = 0; $this->num < sizeof($this->arquivo=$_FILES["img"]); $this->num++)
{
$this->arquivo=$_FILES["img"];
$this->arquivo_nome=$this->arquivo["name"][$this->num];
$this->arquivo_temporario=$this->arquivo["tmp_name"][$this->num];
$this->arquivo_size=$this->arquivo["size"][$this->num];
$this->arquivo_tipo=$this->arquivo["type"][$this->num];
$this->limite[$this->num];
//verifica se existe algum arquivo selecionado
if($this->arquivo_nome==false){
$this->erro = 1;
}
//verifica tamanho do arquivo
if($this->arquivo_size>$this->limite){
$this->erro = 2;
}
//verifica o tipo de arquivo
if(!preg_match("^[image]+[/]+[jpg,png,gif]^",$this->arquivo_tipo)) {
$this->erro = 3;
}
// upload e registro de pasta
$this->arquivo_diretorio = "uploads/".$this->arquivo_nome;
// verifica se arquivo ja existe no diretorio
if(file_exists($this->arquivo_diretorio)) {
$this->erro = 4;
}
else {
$this->erro = 0;
$this->mover_arquivo= move_uploaded_file($this->arquivo_temporario, $this->arquivo_diretorio);
array_push($aux,$this->arquivo_diretorio);
}
}
$this->all_images = $aux;
}
}
$multiplos_uploads=new multiplos_uploads();//objeto instanciado
$multiplos_uploads->envia();
if($multiplos_uploads->erro==0)
{
#todas as imagens
$images = $multiplos_uploads->all_images;
foreach($images as $img)
{
$sql = mysql_query("INSERT INTO projectoimagens (projecto_fk,image) VALUES (%s,'$img')"),
GetSQLValueString($_POST['idz'], "int"));
}
}
}
?> | 3 |
1,341,295 | 08/27/2009 13:57:46 | 74,612 | 03/06/2009 09:16:13 | 1,007 | 31 | Does JavaScript code suffer severely from cross-browser compatibility issues? | Is it in general very hard to port JavaScript code to another browser platform? | cross-browser | javascript | null | null | null | 03/16/2012 19:51:45 | not constructive | Does JavaScript code suffer severely from cross-browser compatibility issues?
===
Is it in general very hard to port JavaScript code to another browser platform? | 4 |
1,693,245 | 11/07/2009 14:37:53 | 84,539 | 03/30/2009 09:34:26 | 313 | 20 | Considerations for changing a page's URL in a CMS | I have written a CMS for a website. You can create pages and do all things you would expect but I am just wanting your opinions on what to do if a user changes the URL of a page. You would need to do a 301 for the previous stored URL but if the user changes the URL 10 times you have to account for all those changes.
Therefore do you not allow users to change the URL or are there other approaches?
Thanks | asp.net | asp.net-mvc | null | null | null | null | open | Considerations for changing a page's URL in a CMS
===
I have written a CMS for a website. You can create pages and do all things you would expect but I am just wanting your opinions on what to do if a user changes the URL of a page. You would need to do a 301 for the previous stored URL but if the user changes the URL 10 times you have to account for all those changes.
Therefore do you not allow users to change the URL or are there other approaches?
Thanks | 0 |
3,709,497 | 09/14/2010 13:52:46 | 231,516 | 12/14/2009 18:29:01 | 5 | 1 | iPhone SDK: Converting/uploading an image to a SOAP service | I'm having issues converting/uploading a camera image to a remote SOAP web service.
Here's the code for converting the image to a byte array:
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
if (image == nil)
image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(image)];
NSString *post_string = [NSString stringWithFormat:@"%@", imageData];
NSData *postData = [post_string dataUsingEncoding:NSUTF8StringEncoding];
NSString *postLength = [[NSString alloc] initWithFormat:@"%d", [postData length]];
Am I converting this image to a byte array properly?
Any help is appreciated. | iphone | uiimage | bytearray | nsdata | null | null | open | iPhone SDK: Converting/uploading an image to a SOAP service
===
I'm having issues converting/uploading a camera image to a remote SOAP web service.
Here's the code for converting the image to a byte array:
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
if (image == nil)
image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(image)];
NSString *post_string = [NSString stringWithFormat:@"%@", imageData];
NSData *postData = [post_string dataUsingEncoding:NSUTF8StringEncoding];
NSString *postLength = [[NSString alloc] initWithFormat:@"%d", [postData length]];
Am I converting this image to a byte array properly?
Any help is appreciated. | 0 |
3,953,696 | 10/17/2010 14:49:51 | 478,570 | 10/17/2010 14:46:40 | 1 | 0 | Draw Thick Line with Border | I am trying to draw thick line between two points, and draw a border for this thick line. | c++ | visual-c++ | null | null | null | 10/18/2010 02:48:37 | not a real question | Draw Thick Line with Border
===
I am trying to draw thick line between two points, and draw a border for this thick line. | 1 |
11,640,092 | 07/24/2012 22:12:41 | 1,305,287 | 03/31/2012 17:00:02 | 1 | 0 | How to plan my GUI ? MVC, spaghetti, dataflow? | So here's the deal. I'm starting to put together a PC based home lab, for an application which is not relevant here. I've chosen to use Python, partly because we use it at work, partly because it's native on both 'doze and 'nix, and partly because I'm starting to get a glimpse of some of the advantages that OO approaches can bring. The instruments include things like USB thermometers and DVMs, the audio input for a spectrum analyser, webcam and so on. So heterogeneous, configurable, not well-defined at the moment.
I want to write not one GUI, but a whole suite of GUIs, from throat-clearing for each single instrument, to running several together and comparing their outputs. Obviously, I don't want to rewrite from scratch for each setup.
So far, I've got a simple audio input going, using PyAudio in a thread to make it non-blocking, putting chunks into a queue, with Tkinter waiting on the queue to display the average of each data chunk in a label. So far, so simple. A few years ago, at this point I would have started adding spaghetti.
However, I've read a lot of guidelines about how to use Tkinter - one thread, get all its tasks from one queue, which can be loaded by a multiplicity of sources. I've also read a lot about MVC.
So the question. Should I use MVC for a task of this type, or is it overkill? If I do use it, how do I partition? Should I just expand to more instruments with each asynchronous data source shovelling data and display tasks into a (probably Priority) queue, for the single Tk main thread to ask its appropriate display object to show the data? Is that likely to be a sufficiently extensible model so that I don't have major rewrites as my lab grows?
Perhaps I can make my question more concrete with the next specific job I have for the audio input analyser. The throat-clearing task for the analyser was to display the average power of each chunk - so I can turn the audio sources up and down and see what's happening on the GUI in real time. The next task is to display the average of the phase difference between the channels over many chunks. Computing the phase difference is a no-brainer, that's part of the model, or data source. However, does the avering task go in the Model, it is after all a property of the world out there, and pass parameters from the user to the model to control the amount of averaging, and view the average like any other number. Or do I put the averaging in the View, and have the view ask the model for the relevant historical data, average and display it, probably using an AverageDisplay, subclassed from my simple data display? Or do I put it in the Controller? One problem I had when reading about MVC, the controller appears to be begging for spaghetti to be dumped on it. So I'm not sure I understand enough yet for MVC concepts to be helpful.
I'm very tempted to use what is basically a of data flow approach, and have a thread which computes the average, waiting on a queue from the audio input, feeding the GUI from its queue. That doesn't seem to fit any of the MVC-type partitions, but it feels reasonably clean and extensible, and can map very closely to a block'and'arrows type processing diagram drawn on the back of an envelope.
Thoughts? | python | mvc | gui | coding-style | tkinter | 07/24/2012 22:20:52 | not a real question | How to plan my GUI ? MVC, spaghetti, dataflow?
===
So here's the deal. I'm starting to put together a PC based home lab, for an application which is not relevant here. I've chosen to use Python, partly because we use it at work, partly because it's native on both 'doze and 'nix, and partly because I'm starting to get a glimpse of some of the advantages that OO approaches can bring. The instruments include things like USB thermometers and DVMs, the audio input for a spectrum analyser, webcam and so on. So heterogeneous, configurable, not well-defined at the moment.
I want to write not one GUI, but a whole suite of GUIs, from throat-clearing for each single instrument, to running several together and comparing their outputs. Obviously, I don't want to rewrite from scratch for each setup.
So far, I've got a simple audio input going, using PyAudio in a thread to make it non-blocking, putting chunks into a queue, with Tkinter waiting on the queue to display the average of each data chunk in a label. So far, so simple. A few years ago, at this point I would have started adding spaghetti.
However, I've read a lot of guidelines about how to use Tkinter - one thread, get all its tasks from one queue, which can be loaded by a multiplicity of sources. I've also read a lot about MVC.
So the question. Should I use MVC for a task of this type, or is it overkill? If I do use it, how do I partition? Should I just expand to more instruments with each asynchronous data source shovelling data and display tasks into a (probably Priority) queue, for the single Tk main thread to ask its appropriate display object to show the data? Is that likely to be a sufficiently extensible model so that I don't have major rewrites as my lab grows?
Perhaps I can make my question more concrete with the next specific job I have for the audio input analyser. The throat-clearing task for the analyser was to display the average power of each chunk - so I can turn the audio sources up and down and see what's happening on the GUI in real time. The next task is to display the average of the phase difference between the channels over many chunks. Computing the phase difference is a no-brainer, that's part of the model, or data source. However, does the avering task go in the Model, it is after all a property of the world out there, and pass parameters from the user to the model to control the amount of averaging, and view the average like any other number. Or do I put the averaging in the View, and have the view ask the model for the relevant historical data, average and display it, probably using an AverageDisplay, subclassed from my simple data display? Or do I put it in the Controller? One problem I had when reading about MVC, the controller appears to be begging for spaghetti to be dumped on it. So I'm not sure I understand enough yet for MVC concepts to be helpful.
I'm very tempted to use what is basically a of data flow approach, and have a thread which computes the average, waiting on a queue from the audio input, feeding the GUI from its queue. That doesn't seem to fit any of the MVC-type partitions, but it feels reasonably clean and extensible, and can map very closely to a block'and'arrows type processing diagram drawn on the back of an envelope.
Thoughts? | 1 |
7,736,805 | 10/12/2011 07:47:27 | 923,013 | 09/01/2011 07:36:50 | 46 | 1 | Bind from inside template | I got a Telrik:RadChart which is bound to a ObservableCollection.
For this I got a template for the charts legend item, containing a CheckBox.
The IsChecked property of this checkbox I wish to bind to a value in my ObservableCollection, so that I can controll which checkboxes that are checked from my ViewModel.
Is it any way to do this?
My Code:
<Style x:Key="CustomLegendItemStyle" TargetType="telerik:ChartLegendItem" >
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:ChartLegendItem">
<Grid x:Name="PART_MainContainer">
<Path x:Name="LegendItemMarker"
Height="20"
Width="100"
Style="{TemplateBinding ItemStyle}"
Stretch="Fill">
<Path.Data>
<PathGeometry x:Name="PART_ItemMarkerGeometry" />
</Path.Data>
</Path>
<CheckBox IsChecked=**"HOW TO BIND THIS?"** Name="templateCheckBox"
Content="{TemplateBinding Label}"
Foreground="{TemplateBinding Foreground}">
</CheckBox>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
| silverlight | telerik | radchart | null | null | null | open | Bind from inside template
===
I got a Telrik:RadChart which is bound to a ObservableCollection.
For this I got a template for the charts legend item, containing a CheckBox.
The IsChecked property of this checkbox I wish to bind to a value in my ObservableCollection, so that I can controll which checkboxes that are checked from my ViewModel.
Is it any way to do this?
My Code:
<Style x:Key="CustomLegendItemStyle" TargetType="telerik:ChartLegendItem" >
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:ChartLegendItem">
<Grid x:Name="PART_MainContainer">
<Path x:Name="LegendItemMarker"
Height="20"
Width="100"
Style="{TemplateBinding ItemStyle}"
Stretch="Fill">
<Path.Data>
<PathGeometry x:Name="PART_ItemMarkerGeometry" />
</Path.Data>
</Path>
<CheckBox IsChecked=**"HOW TO BIND THIS?"** Name="templateCheckBox"
Content="{TemplateBinding Label}"
Foreground="{TemplateBinding Foreground}">
</CheckBox>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
| 0 |
10,363,080 | 04/28/2012 11:30:14 | 1,269,266 | 03/14/2012 14:36:07 | 5 | 0 | jquery slideshow effect | This effect can be found in jquery plugins for slideshow?
http://www.rotapanel.com/trivision-anime/trivision_anime.swf
such as: Nivo Slider, ColorBox, Slides, Coin Slider, ...
If not found, Can it be simulated?
thanks, inmoon | jquery | slideshow | effects | jquery-effects | null | 04/30/2012 13:14:51 | not a real question | jquery slideshow effect
===
This effect can be found in jquery plugins for slideshow?
http://www.rotapanel.com/trivision-anime/trivision_anime.swf
such as: Nivo Slider, ColorBox, Slides, Coin Slider, ...
If not found, Can it be simulated?
thanks, inmoon | 1 |
10,673,459 | 05/20/2012 12:37:51 | 1,367,226 | 05/01/2012 05:45:39 | 6 | 0 | FILL DATA FROM TABLE INTO GRIVIEW DEVEXPRESS | In gridcontrol devexpress, I display "employee_id" column as combobox. I want to fill data from EMPLOYEES table into "employee_id" column in gridcontrol devexpress. Thanks. | devexpress | gridcontrol | null | null | null | null | open | FILL DATA FROM TABLE INTO GRIVIEW DEVEXPRESS
===
In gridcontrol devexpress, I display "employee_id" column as combobox. I want to fill data from EMPLOYEES table into "employee_id" column in gridcontrol devexpress. Thanks. | 0 |
7,075,637 | 08/16/2011 08:43:29 | 62,391 | 02/04/2009 12:55:13 | 5,440 | 118 | Delphi Ownership Confusion | I always thought that the owner is responsible for destroying visual controls and that I can manually control destruction if I pass `nil` as the owner.
Consider the following example:
TMyForm = class (TForm)
private
FButton : TButton;
end;
...
FButton := TButton.Create(nil); // no owner!!
FButton.Parent := Self;
I would expect this button to produce a memory leak but it doesn't and in fact the destructor of `TButton` is called.
Further investigation showed that the `TWinControl` destructor contains the following snippet of code:
I := ControlCount;
while I <> 0 do
begin
Instance := Controls[I - 1];
Remove(Instance);
Instance.Destroy;
I := ControlCount;
end;
which looks like it is destroying the child components (the ones with `Parent` set to the control itself).
I was not expecting the parent control to destroy the control. Can anybody explain why this is happening? And who is destroying the object if I pass in an owner?
| delphi | memory-management | components | delphi-xe | ownership | null | open | Delphi Ownership Confusion
===
I always thought that the owner is responsible for destroying visual controls and that I can manually control destruction if I pass `nil` as the owner.
Consider the following example:
TMyForm = class (TForm)
private
FButton : TButton;
end;
...
FButton := TButton.Create(nil); // no owner!!
FButton.Parent := Self;
I would expect this button to produce a memory leak but it doesn't and in fact the destructor of `TButton` is called.
Further investigation showed that the `TWinControl` destructor contains the following snippet of code:
I := ControlCount;
while I <> 0 do
begin
Instance := Controls[I - 1];
Remove(Instance);
Instance.Destroy;
I := ControlCount;
end;
which looks like it is destroying the child components (the ones with `Parent` set to the control itself).
I was not expecting the parent control to destroy the control. Can anybody explain why this is happening? And who is destroying the object if I pass in an owner?
| 0 |
8,177,610 | 11/18/2011 04:01:00 | 653,012 | 03/10/2011 06:43:19 | 40 | 8 | 500 GB Transcend External hard disk not showing up in windows but shows on ubuntu | I have a 500GB Transcend External Hard Drive. I had been using Windows 7 but switched to Ubuntu 11.04 few months ago. But I was unable to work with many softwares so now I am trying to switch back to Windows 7 again. I have my all projects stuffs on my external hard drive. It works fine on Ubuntu but is not detected on Windows.But when I tried the Windows 7 installation it is detected on the available disk lists, but when I try to open the external hard drive in any other PC with Windows. It doesn't show anything.
Is there anyone who can help me with this?? Hoping for quick help. Btw, I had installed a software named "Mount Manager" on Ubuntu which I had used to mount my external hard drive and it shows the file format as "ntfs-3g" for the hard drive.
Please help as I don't wana loose my works at any cost :( | linux | windows-7 | ubuntu | mount | null | 11/18/2011 04:08:55 | off topic | 500 GB Transcend External hard disk not showing up in windows but shows on ubuntu
===
I have a 500GB Transcend External Hard Drive. I had been using Windows 7 but switched to Ubuntu 11.04 few months ago. But I was unable to work with many softwares so now I am trying to switch back to Windows 7 again. I have my all projects stuffs on my external hard drive. It works fine on Ubuntu but is not detected on Windows.But when I tried the Windows 7 installation it is detected on the available disk lists, but when I try to open the external hard drive in any other PC with Windows. It doesn't show anything.
Is there anyone who can help me with this?? Hoping for quick help. Btw, I had installed a software named "Mount Manager" on Ubuntu which I had used to mount my external hard drive and it shows the file format as "ntfs-3g" for the hard drive.
Please help as I don't wana loose my works at any cost :( | 2 |
10,503,628 | 05/08/2012 17:39:54 | 1,375,332 | 05/04/2012 15:18:29 | 1 | 0 | Is multitouch as hard, as it appears? | I was searching for an example of multitouch but it's always very complicated code, I want to see an example of an application like this:
two buttons, two text fields and when I touch first button, on the first text field appears a text "first" and the second button to the second text field "second" but when I touch and hold the first button the second will work properly too.
Thanks for attention. | java | android | eclipse | touch | multitouch | 05/08/2012 19:54:01 | not a real question | Is multitouch as hard, as it appears?
===
I was searching for an example of multitouch but it's always very complicated code, I want to see an example of an application like this:
two buttons, two text fields and when I touch first button, on the first text field appears a text "first" and the second button to the second text field "second" but when I touch and hold the first button the second will work properly too.
Thanks for attention. | 1 |
5,552,579 | 04/05/2011 13:25:23 | 577,455 | 01/16/2011 12:02:24 | 186 | 0 | setting up Python interpreter | I'm following a video tutorial (not available online) for installing Python and setting it up to use with Eclipse (text editor). To configure Eclipse to use Python, he adds the Python interpreter. In his movie, the python interpreter is a file `python.exe`.
However, when I'm browsing through my folder in Python, I don't see a file named python.exe. This (see image) is what I have instead.
1) which of these files do I click on to install the interpreter? or have I done something wrong and the correct file isn't here?
Thanks for your help.
![My python folder][1]
[1]: http://i.stack.imgur.com/WJt8k.png | python | null | null | null | null | null | open | setting up Python interpreter
===
I'm following a video tutorial (not available online) for installing Python and setting it up to use with Eclipse (text editor). To configure Eclipse to use Python, he adds the Python interpreter. In his movie, the python interpreter is a file `python.exe`.
However, when I'm browsing through my folder in Python, I don't see a file named python.exe. This (see image) is what I have instead.
1) which of these files do I click on to install the interpreter? or have I done something wrong and the correct file isn't here?
Thanks for your help.
![My python folder][1]
[1]: http://i.stack.imgur.com/WJt8k.png | 0 |
5,724,345 | 04/20/2011 00:36:37 | 668,135 | 03/20/2011 11:06:29 | 8 | 0 | How to identify if a Directory is a symlink pointing to a network location in .net | In .Net, what is the best way to identify if a Directory is a symlink pointing to a network location?
Thanks | c# | .net | null | null | null | null | open | How to identify if a Directory is a symlink pointing to a network location in .net
===
In .Net, what is the best way to identify if a Directory is a symlink pointing to a network location?
Thanks | 0 |
4,866,608 | 02/01/2011 18:42:54 | 575,235 | 01/14/2011 04:41:23 | 26 | 1 | how to get users from sharepoint user profile db using jquery | i just want to know ` Is there any way to get a sharepoint user using javascript / jquery from default sharepoint-2010 user profile db ??`
well my requirement is to form an array of all sharepoint site users (user name) and use this array in a java function (that run behind the page at client side ) as a data source for a **SPServices function**.
please provide any fisible solution or any other approach for building the array for javascript
thanks
| javascript | jquery | sharepoint2010 | user | null | null | open | how to get users from sharepoint user profile db using jquery
===
i just want to know ` Is there any way to get a sharepoint user using javascript / jquery from default sharepoint-2010 user profile db ??`
well my requirement is to form an array of all sharepoint site users (user name) and use this array in a java function (that run behind the page at client side ) as a data source for a **SPServices function**.
please provide any fisible solution or any other approach for building the array for javascript
thanks
| 0 |
1,491,381 | 09/29/2009 08:59:08 | 93,724 | 04/21/2009 11:14:53 | 36 | 3 | How to catch xulrunners close event and cancel it? | I want to catch the close event of my xulrunner app when user clicks the close button of the main window and ask them for confirmation.If they dont confirm ,i want to cancel this close event and continue the application.
I tried OnClose Event ,but i was not able to cancel it.
How do i implement this?
| xulrunner | event-handling | xul | null | null | null | open | How to catch xulrunners close event and cancel it?
===
I want to catch the close event of my xulrunner app when user clicks the close button of the main window and ask them for confirmation.If they dont confirm ,i want to cancel this close event and continue the application.
I tried OnClose Event ,but i was not able to cancel it.
How do i implement this?
| 0 |
1,138,914 | 07/16/2009 16:55:31 | 1,944 | 08/19/2008 14:49:14 | 2,554 | 71 | Where can I find documentation for Excel's Pictures collection? | I have seen [many references][1] to doing something like the following to insert a picture in Excel:
Set p = ActiveSheet.Pictures.Insert(PathToPicture)
Where can I find the canonical documentation for this?
[1]: http://www.google.com/search?q=excel+Pictures.Insert | excel | excel-vba | vba | null | null | null | open | Where can I find documentation for Excel's Pictures collection?
===
I have seen [many references][1] to doing something like the following to insert a picture in Excel:
Set p = ActiveSheet.Pictures.Insert(PathToPicture)
Where can I find the canonical documentation for this?
[1]: http://www.google.com/search?q=excel+Pictures.Insert | 0 |
8,847,029 | 01/13/2012 07:02:32 | 767,920 | 08/30/2009 07:49:27 | 955 | 17 | Get days from current timestamp in sql query | i have an table
ID Timestamp
1 2010-07-27 13:14:00.000
2 2010-08-13 13:14:00.000
3 2010-12-21 13:14:00.000
now i need to subtract the day from Timestamp column with current getdate()
and get the days from it
Hope my Question is clear any help would be great
Thanks
Prince
| sql-server | null | null | null | null | null | open | Get days from current timestamp in sql query
===
i have an table
ID Timestamp
1 2010-07-27 13:14:00.000
2 2010-08-13 13:14:00.000
3 2010-12-21 13:14:00.000
now i need to subtract the day from Timestamp column with current getdate()
and get the days from it
Hope my Question is clear any help would be great
Thanks
Prince
| 0 |
7,897,667 | 10/26/2011 01:10:30 | 1,010,436 | 10/24/2011 07:45:35 | 1 | 0 | Conceptually, are *pointers like forwarding mail to another inbox? | The value (mail) is being stored/sent in a variable location (inbox) that can be "forwarded" or *pointed to another variable address (another inbox).
//Do I have this right? If I don't, can someone please help me where I am going wrong?
//Thanks!, Alan. | pointers | null | null | null | null | 10/26/2011 01:15:31 | not a real question | Conceptually, are *pointers like forwarding mail to another inbox?
===
The value (mail) is being stored/sent in a variable location (inbox) that can be "forwarded" or *pointed to another variable address (another inbox).
//Do I have this right? If I don't, can someone please help me where I am going wrong?
//Thanks!, Alan. | 1 |
6,309,552 | 06/10/2011 16:45:32 | 775,302 | 05/29/2011 16:44:51 | 36 | 0 | How to use argparse to grab command line arguments in python? | I want to be able to save int after an option is passed through the command line:
Ideally it would be:
python thing.py -s 1 -p 0 1 2 3 -r/-w/-c
-s - store the following int
-p - store the following several ints
the finally part can be only one of three options, depending on what it is I need to act differently
I've been trying to read tutorials but they all use the same two examples that don't explain how to store ints after a -option | python | argparse | null | null | null | null | open | How to use argparse to grab command line arguments in python?
===
I want to be able to save int after an option is passed through the command line:
Ideally it would be:
python thing.py -s 1 -p 0 1 2 3 -r/-w/-c
-s - store the following int
-p - store the following several ints
the finally part can be only one of three options, depending on what it is I need to act differently
I've been trying to read tutorials but they all use the same two examples that don't explain how to store ints after a -option | 0 |
11,663,766 | 07/26/2012 06:40:05 | 1,508,419 | 07/07/2012 07:47:02 | 60 | 0 | Starting using J2EE | I would start to use J2EE for working porpouse but I really don't know where to start with this technology so big.What could I try initially? | java | java-ee | null | null | null | 07/26/2012 07:11:08 | not a real question | Starting using J2EE
===
I would start to use J2EE for working porpouse but I really don't know where to start with this technology so big.What could I try initially? | 1 |
2,586,518 | 04/06/2010 16:28:11 | 11,559 | 09/16/2008 09:09:14 | 1,308 | 53 | How to best work with a "forked" a git repo, and push some new features back to origin | I'm having a blog-project on GibHub, where a friend of mine, wants to base his code on.
He will make some changes to some files that he do not wish to commit back to me (maybe stylesheets and images), but he will maybe implement a new feature that he would like to push back to my project.
He should also be able to get new code from me, where he would like to get all new stuff.
I've looked around, and it seams that Rebase is the way to go for him, to get updates from me, but how can he most easily push a feature back to me? (He is just learning Git, as well as me) | git | null | null | null | null | null | open | How to best work with a "forked" a git repo, and push some new features back to origin
===
I'm having a blog-project on GibHub, where a friend of mine, wants to base his code on.
He will make some changes to some files that he do not wish to commit back to me (maybe stylesheets and images), but he will maybe implement a new feature that he would like to push back to my project.
He should also be able to get new code from me, where he would like to get all new stuff.
I've looked around, and it seams that Rebase is the way to go for him, to get updates from me, but how can he most easily push a feature back to me? (He is just learning Git, as well as me) | 0 |
5,511,765 | 04/01/2011 09:54:59 | 566,668 | 09/06/2010 15:05:20 | 21 | 4 | object,functional or dynamic model | Can anybody explain the difference between these three model.
Which one is the best to implement | java | null | null | null | null | 04/01/2011 10:30:45 | not a real question | object,functional or dynamic model
===
Can anybody explain the difference between these three model.
Which one is the best to implement | 1 |
10,546,813 | 05/11/2012 06:56:19 | 1,050,447 | 11/16/2011 20:12:32 | 376 | 9 | Code Igniter Doc Type | I have written an application in Code Igniter.
Unless i declare the <!DOCTYPE HTML> at the very beginning of index.php (the file in the root directory supplied by Code Igniter), Interenet Explorer forces itself into quirks mode and totally messes up my page. I have tried putting at the very beginning of my views with no luck.
This wouldn't normally be a problem, but one of the controllers powers a mobile authentication system that returns a JSON response in the view and the <!DOCTYPE HTML> hinders the response.
So why is the doc type declaration being ignored when placed at the top of my views? and why does it work when placed at the top of index.php?
More importantly, how can I get around this?
Thanks for any help!
| php | html | css | codeigniter | doctype | null | open | Code Igniter Doc Type
===
I have written an application in Code Igniter.
Unless i declare the <!DOCTYPE HTML> at the very beginning of index.php (the file in the root directory supplied by Code Igniter), Interenet Explorer forces itself into quirks mode and totally messes up my page. I have tried putting at the very beginning of my views with no luck.
This wouldn't normally be a problem, but one of the controllers powers a mobile authentication system that returns a JSON response in the view and the <!DOCTYPE HTML> hinders the response.
So why is the doc type declaration being ignored when placed at the top of my views? and why does it work when placed at the top of index.php?
More importantly, how can I get around this?
Thanks for any help!
| 0 |
8,401,967 | 12/06/2011 15:01:19 | 1,083,717 | 12/06/2011 14:46:35 | 1 | 0 | Bing Map iOS SDK get click on BMMarkerView | I am using Bing map SDK for iOS. But getting an issue to detect pushpin click.
I have been able to add pushpins but I want to open UIAlert when user touches pushpin image.
Can anybody please help me with it?
Thanks in Advance. | ios | sdk | bing | null | null | 12/07/2011 17:12:40 | not a real question | Bing Map iOS SDK get click on BMMarkerView
===
I am using Bing map SDK for iOS. But getting an issue to detect pushpin click.
I have been able to add pushpins but I want to open UIAlert when user touches pushpin image.
Can anybody please help me with it?
Thanks in Advance. | 1 |
10,131,740 | 04/12/2012 20:59:09 | 106,532 | 05/13/2009 18:16:47 | 125 | 2 | OneToManyPersister GenerateInsertRowString() creates UPDATE statements | Why does the OneToManyPersister in NHibernate create Update statements when it calls GenerateInsertRowString()?
I have a unidirectional one-to-many relationship and I need the save to cascade, but when the collection calls PerformInsert, an update is issued.
Below is my mapping. We are using a repository pattern. "Root" has a "Parent", and "Parent" has a list of "Child". The repository saves the "Root" and "Parent" and its list of "Child" should be saved via cascading.
<class name="Root">
<id name="Id">
<generator class="My.DomainModel.NHibernate.AssignedOrGuidCombIdGenerator, My.DomainModel.NHibernate" />
</id>
<version name="Version" unsaved-value="0" />
<many-to-one name="Parent" column="ParentId" unique="True" />
</class>
<class name="Parent">
<id name="Id">
<generator class="My.DomainModel.NHibernate.AssignedOrGuidCombIdGenerator, My.DomainModel.NHibernate" />
</id>
<version name="Version" unsaved-value="0" />
<list name="Children" cascade="all">
<key column="ParentId"/>
<index column="Position"/>
<one-to-many class="Child"/>
</list>
</class>
<class name="Child" discriminator-value="G">
<id name="Id">
<generator class="My.DomainModel.NHibernate.AssignedOrGuidCombIdGenerator, My.DomainModel.NHibernate" />
</id>
<discriminator column="ChildType" type="char" />
<version name="Version" unsaved-value="0" />
<subclass name="SubChild1" discriminator-value="N">
<many-to-one name="AnotherClass1" column="Another1Id"/>
</subclass>
<subclass name="SubChild2" discriminator-value="A">
<many-to-one name="AnotherClass2" column="Another2Id"/>
</subclass>
</class> | nhibernate | null | null | null | null | null | open | OneToManyPersister GenerateInsertRowString() creates UPDATE statements
===
Why does the OneToManyPersister in NHibernate create Update statements when it calls GenerateInsertRowString()?
I have a unidirectional one-to-many relationship and I need the save to cascade, but when the collection calls PerformInsert, an update is issued.
Below is my mapping. We are using a repository pattern. "Root" has a "Parent", and "Parent" has a list of "Child". The repository saves the "Root" and "Parent" and its list of "Child" should be saved via cascading.
<class name="Root">
<id name="Id">
<generator class="My.DomainModel.NHibernate.AssignedOrGuidCombIdGenerator, My.DomainModel.NHibernate" />
</id>
<version name="Version" unsaved-value="0" />
<many-to-one name="Parent" column="ParentId" unique="True" />
</class>
<class name="Parent">
<id name="Id">
<generator class="My.DomainModel.NHibernate.AssignedOrGuidCombIdGenerator, My.DomainModel.NHibernate" />
</id>
<version name="Version" unsaved-value="0" />
<list name="Children" cascade="all">
<key column="ParentId"/>
<index column="Position"/>
<one-to-many class="Child"/>
</list>
</class>
<class name="Child" discriminator-value="G">
<id name="Id">
<generator class="My.DomainModel.NHibernate.AssignedOrGuidCombIdGenerator, My.DomainModel.NHibernate" />
</id>
<discriminator column="ChildType" type="char" />
<version name="Version" unsaved-value="0" />
<subclass name="SubChild1" discriminator-value="N">
<many-to-one name="AnotherClass1" column="Another1Id"/>
</subclass>
<subclass name="SubChild2" discriminator-value="A">
<many-to-one name="AnotherClass2" column="Another2Id"/>
</subclass>
</class> | 0 |
10,459,207 | 05/05/2012 05:38:35 | 975,566 | 10/02/2011 16:27:04 | 2,216 | 2 | How can I exit from a javascript function? | I have the following:
function refreshGrid(entity) {
var store = window.localStorage;
var partitionKey;
...
...
I would like to exit from this function if an "if" condition is met. How can I exit? Can I just say break, exit or return? | javascript | jquery | null | null | null | null | open | How can I exit from a javascript function?
===
I have the following:
function refreshGrid(entity) {
var store = window.localStorage;
var partitionKey;
...
...
I would like to exit from this function if an "if" condition is met. How can I exit? Can I just say break, exit or return? | 0 |
11,344,776 | 07/05/2012 12:53:58 | 804,371 | 06/18/2011 08:53:13 | 46 | 1 | From C to C++ or to Java | I have been using C for quite some time and I am thinking of moving to C++. I have asked some people and they answered me that it would be better to get at first more familiar with object oriented programming with java and then move to c++. Is it worth it? If yes, should I master Java before moving to C++? | java | c++ | c | null | null | 07/05/2012 12:57:16 | off topic | From C to C++ or to Java
===
I have been using C for quite some time and I am thinking of moving to C++. I have asked some people and they answered me that it would be better to get at first more familiar with object oriented programming with java and then move to c++. Is it worth it? If yes, should I master Java before moving to C++? | 2 |
10,230,562 | 04/19/2012 14:42:15 | 1,127,609 | 01/03/2012 10:19:25 | 321 | 13 | Confusion over the State Monad code on "Learn you a Haskell" | I am trying to get a grasp on Haskell using the online book [Learn you a Haskell for great Good](http://learnyouahaskell.com).
I have, to my knowledge, been able to understand Monads so far until I hit the chapter introducing the [State Monad](http://learnyouahaskell.com/for-a-few-monads-more#state).
However, the code presented and claimed to be the Monad implementation of the State type (I have not been able to locate it in Hoogle) seems too much for me to handle.
* To begin with, I do not understand the logic behind it i.e why it should work and how the author considered this technique.( maybe relevant articles or white-papers can be suggested?)
* At line 4, it is suggested that function f takes 1 parameter.
However a few lines down we are presented with pop, which takes no parameters!
* To extend on point 1, what is the author trying to accomplish using a function to represent the State.
Any help in understanding what is going on is greatly appreciated. | haskell | monads | state-monad | null | null | null | open | Confusion over the State Monad code on "Learn you a Haskell"
===
I am trying to get a grasp on Haskell using the online book [Learn you a Haskell for great Good](http://learnyouahaskell.com).
I have, to my knowledge, been able to understand Monads so far until I hit the chapter introducing the [State Monad](http://learnyouahaskell.com/for-a-few-monads-more#state).
However, the code presented and claimed to be the Monad implementation of the State type (I have not been able to locate it in Hoogle) seems too much for me to handle.
* To begin with, I do not understand the logic behind it i.e why it should work and how the author considered this technique.( maybe relevant articles or white-papers can be suggested?)
* At line 4, it is suggested that function f takes 1 parameter.
However a few lines down we are presented with pop, which takes no parameters!
* To extend on point 1, what is the author trying to accomplish using a function to represent the State.
Any help in understanding what is going on is greatly appreciated. | 0 |
11,674,140 | 07/26/2012 16:49:37 | 603,840 | 02/04/2011 21:34:17 | 793 | 8 | stop tiling on body tag in outlook | I'm using a background image on a body tag for an emailer but when I test it in outlook it is tiling x and y. Is there a way to stop this from happening.
<body style="background-repeat:no-repeat" bgColor=#ffffff background="http://www.bla.com/bla/twc/email-bg.jpg">
I have also tried background-repeat:no-repeat no-repeat;
I have also specified a width and height
Thanks | html | css | outlook | null | null | null | open | stop tiling on body tag in outlook
===
I'm using a background image on a body tag for an emailer but when I test it in outlook it is tiling x and y. Is there a way to stop this from happening.
<body style="background-repeat:no-repeat" bgColor=#ffffff background="http://www.bla.com/bla/twc/email-bg.jpg">
I have also tried background-repeat:no-repeat no-repeat;
I have also specified a width and height
Thanks | 0 |
1,283,216 | 08/16/2009 00:41:41 | 144,154 | 07/24/2009 00:06:44 | 34 | 3 | C++ string addition | Simple question:
If I have a string and I want to add to it head and tail strings (one in the beginning and the other at the end), what would be the best way to do it?
Something like this:
std::string tmpstr("some string here");
std::string head("head");
std::string tail("tail");
tmpstr = head + tmpstr + tail;
Is there any better way to do it?
Thanks in advance. | c++ | string | addition | insert | null | null | open | C++ string addition
===
Simple question:
If I have a string and I want to add to it head and tail strings (one in the beginning and the other at the end), what would be the best way to do it?
Something like this:
std::string tmpstr("some string here");
std::string head("head");
std::string tail("tail");
tmpstr = head + tmpstr + tail;
Is there any better way to do it?
Thanks in advance. | 0 |
10,682,681 | 05/21/2012 09:29:01 | 211,452 | 11/15/2009 14:27:23 | 1,051 | 23 | sql server database security | I've Sql Server 2008 installed on Windows 2008 Server.
I've disabled built-in administrator user and created sa with sysadmin privileges.
Question is: Is there any way to access to db, or back up it or methods to reset(and/or)get password for **sa**?
I want to secure my database.
Thanks.
| sql-server | security | null | null | null | 05/21/2012 21:21:47 | off topic | sql server database security
===
I've Sql Server 2008 installed on Windows 2008 Server.
I've disabled built-in administrator user and created sa with sysadmin privileges.
Question is: Is there any way to access to db, or back up it or methods to reset(and/or)get password for **sa**?
I want to secure my database.
Thanks.
| 2 |
9,181,984 | 02/07/2012 18:46:31 | 1,036,335 | 11/08/2011 19:41:28 | 62 | 0 | What does -q, -f, -c symbols mean in cron command? | I want to run PHP script via Cron Jobs. So, I read some tutorials and mentioned that there is some difference between commands. So, these commands are these:<br/>
1)<br/> `php myscript.php`<br/>
2)<br/> `php -q myscript.php`<br/>
3)<br/> `php -c myscript.php`<br/>
4)<br/> `php -f myscript.php`<br/>
<br/> **The question is:**<br/>
What does these `-q`, `-c`, `-f` symbols mean ?
| php | linux | unix | cron | crontab | 02/07/2012 19:31:54 | not constructive | What does -q, -f, -c symbols mean in cron command?
===
I want to run PHP script via Cron Jobs. So, I read some tutorials and mentioned that there is some difference between commands. So, these commands are these:<br/>
1)<br/> `php myscript.php`<br/>
2)<br/> `php -q myscript.php`<br/>
3)<br/> `php -c myscript.php`<br/>
4)<br/> `php -f myscript.php`<br/>
<br/> **The question is:**<br/>
What does these `-q`, `-c`, `-f` symbols mean ?
| 4 |
11,387,116 | 07/08/2012 22:06:44 | 1,294,251 | 03/26/2012 23:39:03 | 46 | 0 | Color Cells in a Worksheet Based on Data From Another Worksheet in Same Workbook | I have the following worksheet called **Data**:
![enter image description here][1]
In the same workbook I have another worksheet called **Employee Database**.
![enter image description here][2]
In Excel, how can I color the "Employee E-mail Address" and the corresponding "Company" and "Company URL" cells red from the **Data** worksheet if the "Employee E-mail Address" is not in the **Employee Database**?
In otherwords, I am looking for the following result:
![enter image description here][3]
I've just given an example and in reality I have over 10,000 cells worth of data to do this to. I started doing this manually and realized it will take me forever.
I'd love to know if there is a macro that can do this in Excel?
Help would be so much appreciated! I have the example workbook of the screenshots above available for download here:
http://www.mediafire.com/?dttztp66dvjkzn8
[1]: http://i.stack.imgur.com/6fXX9.jpg
[2]: http://i.stack.imgur.com/EUWOJ.jpg
[3]: http://i.stack.imgur.com/CdrcN.jpg | excel | excel-vba | excel-2007 | excel-2010 | null | null | open | Color Cells in a Worksheet Based on Data From Another Worksheet in Same Workbook
===
I have the following worksheet called **Data**:
![enter image description here][1]
In the same workbook I have another worksheet called **Employee Database**.
![enter image description here][2]
In Excel, how can I color the "Employee E-mail Address" and the corresponding "Company" and "Company URL" cells red from the **Data** worksheet if the "Employee E-mail Address" is not in the **Employee Database**?
In otherwords, I am looking for the following result:
![enter image description here][3]
I've just given an example and in reality I have over 10,000 cells worth of data to do this to. I started doing this manually and realized it will take me forever.
I'd love to know if there is a macro that can do this in Excel?
Help would be so much appreciated! I have the example workbook of the screenshots above available for download here:
http://www.mediafire.com/?dttztp66dvjkzn8
[1]: http://i.stack.imgur.com/6fXX9.jpg
[2]: http://i.stack.imgur.com/EUWOJ.jpg
[3]: http://i.stack.imgur.com/CdrcN.jpg | 0 |
378,835 | 12/18/2008 19:01:37 | 2,974 | 08/26/2008 09:39:16 | 3,806 | 222 | A standard set of questions to ask an interviewer? | We have had many questions for interviewers to ask interviewees. But none addressing information flow in the other direction, interviewee to interviewer. Just an indirect question about "[deal breakers][1]" and one about "[finding dream jobs][2]".
What I'm after is when you're interviewing at a company do you have a set of questions that you like to ask to help get a feel for the company and the work environment?
I have a series of questions that I like to ask that range from the development environment to testing techniques to how the team get on together.
I start with the Joel test and work from there.
My extra questions for development:
1. How long does your design, code and test cycle last? Less than thirty seconds, less than five minutes, less than ten minutes, etc.
1. Do you encourage refactoring if sufficient unit tests exist?
1. What test bench do you use?
1. Do you have coding standards?
1. Are the standards revisited or are they just left, as written, i.e. "carved in stone", in 2001?
1. Do you allow time for peer reviews of code?
1. Does the project have continuous integration?
1. Does the project have regular regression testing?
1. Are metrics kept for the code base? SLOC? Unit tests? Regression tests?
My extra questions for estimating:
1. Do you have a standard template for estimating development effort for new work to make sure nothing is overlooked?
1. A process for obtaining such an estimate?
1. What percentage of contingency do you build in to your estimates?
1. Do you allow time to revisit
My team questions:
1. Does the company have a training policy?
1. What were the latest courses that the company sent people on?
1. Does the company have a mentoring policy?
1. What has the team achieved so far?
1. What has the team learnt?
1. What aspects of the team would you like to change to improve the team?
1. What's the team spirit like?
1. Where do team members generally have lunch?
1. Does the team go out together every now and then?
1. Do you encourage team members to give presentations to improve their abilities?
1. Do you do the same with writing?
Anything else you'd like to ask?
cheers,
Rob
[1]: http://stackoverflow.com/questions/242996/dealbreakers-for-new-programming-jobs
[2]: http://stackoverflow.com/questions/180178/how-did-you-find-your-dream-job-or-great-place-to-work | interview-questions | company-questions | null | null | null | 12/13/2011 18:43:20 | not constructive | A standard set of questions to ask an interviewer?
===
We have had many questions for interviewers to ask interviewees. But none addressing information flow in the other direction, interviewee to interviewer. Just an indirect question about "[deal breakers][1]" and one about "[finding dream jobs][2]".
What I'm after is when you're interviewing at a company do you have a set of questions that you like to ask to help get a feel for the company and the work environment?
I have a series of questions that I like to ask that range from the development environment to testing techniques to how the team get on together.
I start with the Joel test and work from there.
My extra questions for development:
1. How long does your design, code and test cycle last? Less than thirty seconds, less than five minutes, less than ten minutes, etc.
1. Do you encourage refactoring if sufficient unit tests exist?
1. What test bench do you use?
1. Do you have coding standards?
1. Are the standards revisited or are they just left, as written, i.e. "carved in stone", in 2001?
1. Do you allow time for peer reviews of code?
1. Does the project have continuous integration?
1. Does the project have regular regression testing?
1. Are metrics kept for the code base? SLOC? Unit tests? Regression tests?
My extra questions for estimating:
1. Do you have a standard template for estimating development effort for new work to make sure nothing is overlooked?
1. A process for obtaining such an estimate?
1. What percentage of contingency do you build in to your estimates?
1. Do you allow time to revisit
My team questions:
1. Does the company have a training policy?
1. What were the latest courses that the company sent people on?
1. Does the company have a mentoring policy?
1. What has the team achieved so far?
1. What has the team learnt?
1. What aspects of the team would you like to change to improve the team?
1. What's the team spirit like?
1. Where do team members generally have lunch?
1. Does the team go out together every now and then?
1. Do you encourage team members to give presentations to improve their abilities?
1. Do you do the same with writing?
Anything else you'd like to ask?
cheers,
Rob
[1]: http://stackoverflow.com/questions/242996/dealbreakers-for-new-programming-jobs
[2]: http://stackoverflow.com/questions/180178/how-did-you-find-your-dream-job-or-great-place-to-work | 4 |
10,626,123 | 05/16/2012 20:22:42 | 242,721 | 01/03/2010 15:29:06 | 496 | 20 | wpf xaml scrollable control container - scrollbar always disabled | I am new to xaml and wpf.
I am trying to insert some user controls into a container from the code-behind.
I have read this blog entry from [M$][1].
I tried all the methods used there and some others but the scroll bar is never enabled.
My current code that I stuck with is this:
<DockPanel>
<ScrollViewer HorizontalAlignment="Left" Margin="252,12,0,0">
<ItemsControl Name="captchaControls" Width="339" Height="286">
</ItemsControl>
</ScrollViewer>
</DockPanel>
It should work according to M$ but it doesn't :(. Does anyone know why? Thank you.
[1]: http://blogs.msdn.com/b/marcelolr/archive/2009/06/09/stackpanel-dockpanel-and-scrolling-items.aspx | wpf | xaml | null | null | null | null | open | wpf xaml scrollable control container - scrollbar always disabled
===
I am new to xaml and wpf.
I am trying to insert some user controls into a container from the code-behind.
I have read this blog entry from [M$][1].
I tried all the methods used there and some others but the scroll bar is never enabled.
My current code that I stuck with is this:
<DockPanel>
<ScrollViewer HorizontalAlignment="Left" Margin="252,12,0,0">
<ItemsControl Name="captchaControls" Width="339" Height="286">
</ItemsControl>
</ScrollViewer>
</DockPanel>
It should work according to M$ but it doesn't :(. Does anyone know why? Thank you.
[1]: http://blogs.msdn.com/b/marcelolr/archive/2009/06/09/stackpanel-dockpanel-and-scrolling-items.aspx | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.