unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
How to loop an entire GridView having AllowPaging attribute set to true? === I have a GridView asp server control in a page and I have set its AllowPaging to true. Now, I want to loop to the entire rows but it only iterates to the number of PageSize that I have defined. Here is the asp code: <asp:GridView ID="gvName" runat="server" AllowPaging="True" PageSize="5" AutoGenerateColumns="True"></asp:GridView> Here is the code behind: List<string> list = new List<String>(); for(int x = 0; x <= 9; x++) { list.Add("Name " + (x + 1).ToString()); } gvName.DataSource = list; gvName.DataBind(); foreach(GridViewRow row in gvName.Rows) { // gvName.Rows.Count only returns 5 instead of the total number of its record that is 10 }
0
[ 2, 184, 20, 5293, 40, 1078, 7354, 4725, 452, 1655, 306, 7426, 35, 14755, 309, 20, 1151, 60, 800, 3726, 3726, 31, 57, 21, 7354, 4725, 28, 306, 8128, 569, 19, 21, 2478, 17, 31, 57, 309, 82, 1655, 306, 7426, 20, 1151, 9, 130, 15,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android - set a zoom for my drawn canvas === I have an application which draws a maze using lines from 2 boolean arrays onto a canvas. I have got this all working as it should, however I need a way to set the zoom so it only ever shows 5x5 instead of the current maze size of 50x50. A little further information - the user circle will always be in the center of the maze and when he move in any direction the next section of the maze would be displayed. Please view my previous questions for some code snippets which may be useful. <a href="http://stackoverflow.com/questions/11310279/android-canvas-ondraw/11311557#comment14905142_11311557">Previous Question Code Snippets</a> Any help/ guidence here would be much appreciated. Thanks
0
[ 2, 13005, 13, 8, 309, 21, 19469, 26, 51, 3160, 9696, 800, 3726, 3726, 31, 57, 40, 3010, 56, 10802, 21, 14576, 568, 1560, 37, 172, 9827, 413, 210, 7718, 18, 1204, 21, 9696, 9, 31, 57, 330, 48, 65, 638, 28, 32, 378, 15, 207, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
client_side_validations gem anche conditional validation === First of all I'm working on a rails 3.2 app and I'm using client_side_validation gem. Is there a way from js to enable/disable the validation of certain fields? I need a conditional validation depending on a select input. Do i need to fallback on server-side validation?
0
[ 2, 6819, 1, 1416, 1, 18506, 43, 7504, 8551, 40, 2569, 21206, 27999, 800, 3726, 3726, 64, 16, 65, 31, 22, 79, 638, 27, 21, 2240, 18, 203, 9, 135, 4865, 17, 31, 22, 79, 568, 6819, 1, 1416, 1, 18506, 43, 857, 8551, 9, 25, 80, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Exclude all normal alphanumeric character from a mixed chinese-and-alphanumeric character word list === I have a list of chinese characters and normal alphanumeric characters, mixed together, and I want to get rid of any element that contains an alphanumeric character. Is there a simple way to do this? If I simply exclude any element that contains an alphanumeric character, I get no result because the chinese characters (in utf-8) are similarly affected. I also tried [w for w in fourchar if w.startswith("\x")] to try to get the chinese characters but I'm not sure if that's valid at all. I'm having difficulty figuring out what the alphanumeric characters are in unicode. Thanks for any help!
0
[ 2, 21077, 65, 1826, 5705, 6336, 14744, 925, 37, 21, 2198, 1116, 8, 290, 8, 22480, 6336, 14744, 925, 833, 968, 800, 3726, 3726, 31, 57, 21, 968, 16, 1116, 1766, 17, 1826, 5705, 6336, 14744, 1766, 15, 2198, 429, 15, 17, 31, 259, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android XML Parsing & Preferences Error === Im parsing an xml file and i keep getting a nullpointer exception. I don't know here the null pointer is :( ListView.java static String URL = "https://dl.dropbox.com/u/####/wosm-library-EN.xml"; static final String KEY_ITEM = "item"; static final String KEY_ID = "id"; static final String KEY_TITLE = "title"; static final String KEY_DESCRIPTION = "description"; static final String KEY_FILESIZE = "filesize"; static final String KEY_THUMB_URL = "thumb_url"; static final String KEY_DOCUMENT_URL = "document_url"; SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); ListView list; LazyAdapter adapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.library); sharedPrefs.getBoolean("french", false); { URL="https://dl.dropbox.com/u/######/wosm-library-EN.xml"; } sharedPrefs.getBoolean("french", true); { URL="https://dl.dropbox.com/u/######/wosm-library-FR.xml"; } ArrayList<HashMap<String, String>> libraryList = new ArrayList<HashMap<String, String>>(); XMLParser parser = new XMLParser(); String xml = parser.getXmlFromUrl(URL); Document doc = parser.getDomElement(xml); NodeList nl = doc.getElementsByTagName(KEY_ITEM); for (int i = 0; i < nl.getLength(); i++) { HashMap<String, String> map = new HashMap<String, String>(); Element e = (Element) nl.item(i); map.put(KEY_ID, parser.getValue(e, KEY_ID)); map.put(KEY_TITLE, parser.getValue(e, KEY_TITLE)); map.put(KEY_DESCRIPTION, parser.getValue(e, KEY_DESCRIPTION)); map.put(KEY_FILESIZE, parser.getValue(e, KEY_FILESIZE)); map.put(KEY_THUMB_URL, parser.getValue(e, KEY_THUMB_URL)); map.put(KEY_DOCUMENT_URL, parser.getValue(e, KEY_DOCUMENT_URL)); libraryList.add(map); } list=(ListView)findViewById(R.id.list); adapter=new LazyAdapter(this, libraryList); list.setAdapter(adapter); list.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { String title = ((TextView) view.findViewById(R.id.title)).getText().toString(); String description = ((TextView) view.findViewById(R.id.artist)).getText().toString(); //String thumb_url = ((ImageView)view.findViewById(R.id.list_image)).getImageMatrix().toString(); //String thumb_url = ((TextView) view.findViewById(R.id.thumburl)).getText().toString(); String filesize = ((TextView) view.findViewById(R.id.duration)).getText().toString(); String thumburl = ((TextView) view.findViewById(R.id.imgurl)).getText().toString(); String doc_url = ((TextView) view.findViewById(R.id.documenturl)).getText().toString(); Intent in = new Intent(CustomizedListView.this, org.scouts.library.SingleMenuItem.class); in.putExtra(KEY_TITLE, title); in.putExtra(KEY_DESCRIPTION, description); //in.putExtra(KEY_THUMB_URL, thumb_url); in.putExtra(KEY_FILESIZE, filesize); in.putExtra(KEY_THUMB_URL, thumburl); in.putExtra(KEY_DOCUMENT_URL, doc_url); startActivity(in); } }); } } i only started getting the nullpointer excepetion after i added the preference variable
0
[ 2, 13005, 23504, 2017, 18, 68, 279, 9808, 18, 7019, 800, 3726, 3726, 797, 2017, 18, 68, 40, 23504, 3893, 17, 31, 643, 1017, 21, 16203, 3132, 106, 5391, 9, 31, 221, 22, 38, 143, 235, 14, 16203, 454, 106, 25, 13, 45, 5, 968, 472...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Modifying Identity for oracle.security.idm.RoleProfile using setProperty method === In the [Oracle® Fusion Middleware Security Guide][1] under the section Modifying an Identity, it is written: > In order to modify an identity, you need a reference to the identity. > The User, UserProfile, Role, and RoleProfile classes provide the > following APIs to facilitate modifying identities: > > user.setProperty(ModProperty prop); user.setProperties(ModProperty > [] props); > > ModProperty structure consists of: > > the field name > > its new value(s) > > the modifying operator > > Valid operators are: > > ModProperty.ADD ModProperty.REMOVE ModProperty.REPLACE > > In this example, a display name is replaced: > > UserProfile usrprofile = usr.getUserProfile(); ModProperty mprop = > new ModProperty(UserProfile.DISPLAY_NAME, "modified display name", > ModProperty.REPLACE); usrprofile.setProperty(mprop); But no sample is provided for the [oracle.security.idm.RoleProfile][2]. Also this interface doesn't have the `setProperty(ModProperty mprop)` like [oracle.security.idm.UserProfile][3]. So how do we change the property for this class? [1]: http://docs.oracle.com/cd/E12839_01/core.1111/e10043/devuserole.htm [2]: http://docs.oracle.com/cd/E15523_01/apirefs.1111/e14658/oracle/security/idm/RoleProfile.html [3]: http://docs.oracle.com/cd/E15523_01/apirefs.1111/e14658/oracle/security/idm/UserProfile.html#setProperty_oracle_security_idm_ModProperty_
0
[ 2, 17579, 68, 3270, 26, 15759, 9, 17749, 9, 1340, 79, 9, 661, 413, 14503, 568, 309, 10890, 106, 1084, 2109, 800, 3726, 3726, 19, 14, 636, 6055, 5615, 1, 11117, 772, 5011, 1221, 3378, 500, 2558, 165, 500, 131, 14, 1050, 17579, 68, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How would you encode a jwt using ColdFusion 9 or above syntax? === [Their Python example][1] seems to be the simplest, although I disagree with using the variable named cakeToken because that's confusing me with the Item Name being purchased: cakeToken = jwt.encode( { "iss" : sellerIdentifier, "aud" : "Google", "typ" : "google/payments/inapp/item/v1", "exp" : int(time.time() + 3600), "iat" : int(time.time()), "request" :{ "name" : "Piece of Cake", "description" : "Virtual chocolate cake to fill your virtual tummy", "price" : "10.50", "currencyCode" : "USD", "sellerData" : "user_id:1224245,offer_code:3098576987,affiliate:aksdfbovu9j" } }, SELLER_SECRET) Q: Where are they getting jwt from, or is that a variable that is being created? I suppose SELLER_SECRET is a variable, populated from the [sandbox settings page][2]. I think we would use dateadd('s',3600,now()) instead of time.time()+3600. They also advise to use Google OpenID instead of rolling your own login, but that seems to be quite complex. [1]: https://developers.google.com/in-app-payments/docs/tutorial#1 [2]: https://sandbox.google.com/checkout/customer/gadget/inapp/settings.html
0
[ 2, 184, 83, 42, 20523, 21, 487, 499, 38, 568, 1191, 9818, 561, 54, 784, 22649, 60, 800, 3726, 3726, 636, 18073, 20059, 823, 500, 2558, 165, 500, 2206, 20, 44, 14, 24384, 15, 419, 31, 18276, 29, 568, 14, 7612, 377, 8390, 262, 285...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to load collections lazily with left outer join using NHibernate Criteria === I am using left outer join to include entities with null object reference values for another entity. However, this is causing the entities to load up along with their collection objects eagerly if I am filtering by any of the collection object properties. I would like to load these collection objects lazily so I tried changing the fetch mode to lazy and select. However, it still loads up everything using a single query. I am using Criteria API and can describe data model and resulting query a bit more if required. Thanks in advance for answers.
0
[ 2, 184, 20, 6305, 5721, 333, 2553, 102, 29, 225, 4896, 1865, 568, 12109, 15191, 8820, 9157, 800, 3726, 3726, 31, 589, 568, 225, 4896, 1865, 20, 468, 12549, 29, 16203, 3095, 2801, 4070, 26, 226, 9252, 9, 207, 15, 48, 25, 3242, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is JavaFX 2.2 going to support GPU acceleration in Linux? === I've been experimenting with JavaFX, and I've found out that as of 2.2.0.b15, it uses GPU to provide improved font rendering. This makes a big difference for me. I intend to use it for visualization and animated UI features, so I'd like to know if GPU support will be provided in Linux. I have come accross many statements that say that JavaFX will use my GPU if it is supported, and it does, but only under Windows. I have not seen anything about hardware acceleration for graphics under Linux, so I'm curious, can I expect to have this with 2.2 release?
0
[ 2, 25, 8247, 16488, 172, 9, 135, 228, 20, 555, 489, 4201, 17661, 19, 13024, 60, 800, 3726, 3726, 31, 22, 195, 74, 5737, 68, 29, 8247, 16488, 15, 17, 31, 22, 195, 216, 70, 30, 28, 16, 172, 9, 135, 9, 387, 9, 220, 1193, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Are typed/generic aspects worth the effort? === I've done a little research on typed/generic aspects. An important fact about aspects is obliviousness. So the concerns of the aspects should be orthogonal to the domain concerns. Nevertheless there are investigations to make AspectJ type safe (StrongAspectJ) / introduce per-type aspects using generics. One paper mentioned an implementation of the Flyweight pattern as an aspect. Now I'm wondering if there are more use cases for generic aspects?
0
[ 2, 50, 1001, 43, 118, 17083, 596, 4842, 2715, 14, 2150, 60, 800, 3726, 3726, 31, 22, 195, 677, 21, 265, 527, 27, 1001, 43, 118, 17083, 596, 4842, 9, 40, 681, 837, 88, 4842, 25, 20970, 720, 9, 86, 14, 4823, 16, 14, 4842, 378, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to run a RegisterStartupScript in update panel on page load === Hi I'm try to get the RegisterStartupScript to appear after I handle the exception. But when i handle the exception it updates the whole page instead of a portion of a page. Is there some way that I could get it to update only a portion of the page. I know you can use update panel to achieve this but I could only get it to work on button click, is there some way to make it work on page load? Code: ` ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Login Again');window.location ='Login.aspx';", true); `
0
[ 2, 184, 20, 485, 21, 2243, 13680, 576, 8741, 19, 11100, 4113, 27, 2478, 6305, 800, 3726, 3726, 4148, 31, 22, 79, 1131, 20, 164, 14, 2243, 13680, 576, 8741, 20, 1893, 75, 31, 3053, 14, 5391, 9, 47, 76, 31, 3053, 14, 5391, 32, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Having trouble entering a function with javascript === The main goal is to get the latitude and longitude values into function calculateDistanceBetweenPOIs(Latitude, Longitude) and then somehow extract the lat and lon from each of the values to use for calculating software. Below is the code i am working with except the display value. I really have no clue why the Latitude and Longitude values are not being passed into my calculateDistanceBetweenPOIs function function DistanceCalculation() { console.log("Inside DistanceCalculation() function that runs onload"); var Hunter = new POI("Hunter Library", 35.313316, -83.179788); //Hunter and FRH Lat and Long var FRH= new POI( "FRH Building", 35.307859, -83.186385); console.dir(Hunter); console.dir(FRH); //Display new objects displayObject(Hunter); displayObject(FRH); } // --------------------------------------------------------------------------------------- // name: POI object constructor // --------------------------------------------------------------------------------------- function POI(parTitle, parLatitude, parLongitude) { console.log("Inside POI(partitle, parlatitude, parlongitude) function that runs onload"); this.Title = parTitle; this.Latitude = parLatitude; this.Longitude = parLongitude; } function calculateDistanceBetweenPOIs(Latitude, Longitude) { console.log("Inside calculateDistancebetweenPOIs() function that runs onload"); var lon1 = parPOIObject.Latitude; var lat1 = parPOIObject.Latitude; var lon2 = parPOIObject.Longitude; var lon2 = parPOIObject.Longitude; console.log("latitude = " + latitude); console.log("longitude = " + longitude); console.log("title = " + title); } function calculateDistanceInMeters(lat1,lon1,lat2,lon2) { console.log("Inside calculateDistanceInMeters() function"); console.log("lat1 = " + lat1); console.log("lat2 = " + lat2); console.log("lon2 = " + lon2); console.log("lon2 = " + lon2); var R = 6371; // km var dLat = (lat2 - lat1) * Math.PI / 180; var dLon = (lon2 - lon1) * Math.PI / 180; var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.asin(Math.sqrt(a)); var distanceInKilometers = R * c; var distanceInMeters = distanceInKilometers * 1000; var distanceInFeet = distanceInMeters * 3.2808399; console.log("distanceInKilometers = " + distanceInKilometers); console.log("distanceInMeters = " + distanceInMeters); console.log("distanceInFeet = " + distanceInFeet); return distanceInFeet; }
0
[ 2, 452, 2572, 4604, 21, 1990, 29, 8247, 8741, 800, 3726, 3726, 14, 407, 1195, 25, 20, 164, 14, 16337, 17, 22291, 4070, 77, 1990, 18469, 13357, 14427, 1638, 403, 5, 8927, 16731, 15, 22291, 6, 17, 94, 3625, 10962, 14, 14303, 17, 13,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Configure Inetd settings for a particular FTP account === Currently in Inetd , the protocol settings for a particular protocol is same for all the uses who are connecting to system using it . like FTP or so . Is there a way to configure inetd to have a different settings for a particular user only ? for example , currenlty in inetd: > ftp stream tcp nowait/100/40/20 /usr/libexec/ftpd ftpd -l -r > -W Is there any way, to have configure new parameters ( nowait/300/50/40 for a particular FTP user only)
0
[ 2, 1065, 15951, 19, 1198, 43, 12410, 26, 21, 1498, 1187, 306, 2176, 800, 3726, 3726, 871, 19, 19, 1198, 43, 13, 15, 14, 8494, 12410, 26, 21, 1498, 8494, 25, 205, 26, 65, 14, 2027, 72, 50, 6440, 20, 329, 568, 32, 13, 9, 101, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I replace _ with - in my URL in ASP.NET MVC3? === I have my controller names set up as "My_Controller". I'm looking for a way to change my URL from **www.mysite.com/My_Controller/My_Action** to **www.mysite.com/my-controller/my-action/**. Is there anyway to do this without using a URL re-writer extension? If so, how?
0
[ 2, 184, 92, 31, 3934, 13, 1, 29, 13, 8, 19, 51, 287, 6362, 19, 28, 306, 9, 2328, 307, 8990, 240, 60, 800, 3726, 3726, 31, 57, 51, 9919, 1817, 309, 71, 28, 13, 7, 915, 1, 12898, 1252, 7, 9, 31, 22, 79, 699, 26, 21, 161, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Order by highest group - rails === This code here groups a Users friends by highschool name. <% @user.friends.group_by(&:highschool_name).map do |hsname, friends| %> <% next if hsname.blank? %> <div class="contentbox"> <div class="box-header"> <h3><%= hsname %></h3> </div> <ul class="friends-list"> <% friends.map do |friend| %> <li><%= image_tag(friend.image) %> <% end %> </ul> </div> <% end %> But it groups with out any order, I would like to order by highste value. Showing the highest group first and down. Any ideas?
0
[ 2, 389, 34, 1554, 214, 13, 8, 2240, 18, 800, 3726, 3726, 48, 1797, 235, 1170, 21, 3878, 954, 34, 183, 7535, 204, 9, 13, 1, 11881, 13, 1, 16704, 9, 12299, 18, 9, 8024, 1, 779, 5, 1569, 45, 4542, 7535, 1, 7259, 6, 9, 15022, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
XAMPP Error with using ErrorDocument in .htaccess === I am using a .htaccess file for a short url system that I made. It is supposed to use a file, sudir.php, to find the url that the "code" that was entered is for. But whenever I goto the page at `http://localhost/shorturl/t10m3S` which doesn't exist so it is supposed to redirect with sudir.php, but it only takes me to a generic "Not Found" page. This is what i have in my .htaccess: > ErrorDocument 404 /shorturl/sudir.php If I change it to my `phptesting` folder, it shows the index of that folder. If I change it to just the `shorturl` folder, it still gives me the generic 404 error page. If I remove it completely it shows the default page from Apache. So it basically seems like Apache or .htaccess or something doesn't know that the `shorturl` folder exists even though I can access it and it works. It seems all I need is for it to acknowledge that the folder is there and actually load the `sudir.php` file, but I don't know what to do.
0
[ 2, 993, 765, 3421, 7019, 29, 568, 7019, 28132, 19, 13, 9, 9020, 20604, 800, 3726, 3726, 31, 589, 568, 21, 13, 9, 9020, 20604, 3893, 26, 21, 502, 287, 6362, 329, 30, 31, 117, 9, 32, 25, 2293, 20, 275, 21, 3893, 15, 9680, 1523, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS FTP using CFFTP - How do I prevent the default CWD / command from being issued? === Using the SimpleFTPSample I have managed to obtain a list of the files on a server, when logged in as annonymous user This particular server issues a 504 error if I try logging in as known user, with password The problem seems to be that the CFFTPNetwork issues a "CWD /" command as part of the connection creation - after user and password have been accepted. Does anyone have a way of : 1 . Preventing the client from sending the CWD / or 2 . Trapping the 504 error before the stream closes the connection (which seems to happen almost instantaneously)
0
[ 2, 13, 7760, 1187, 306, 568, 10084, 3072, 306, 13, 8, 184, 107, 31, 2501, 14, 12838, 15739, 43, 13, 118, 1202, 37, 142, 2212, 60, 800, 3726, 3726, 568, 14, 1935, 3072, 1919, 765, 5106, 31, 57, 1471, 20, 5545, 21, 968, 16, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unbind & Bind tablesorter with pagination (Deactivate and activate the jquery plugin) === I am using tablesorter http://www.pengoworks.com/workshop/jquery/tablesorter/tablesorter.htm for my dynamic html table, I am facing issues with paginations as for some reason it still holds onto the pagination values from initialization. On a button click, I need to remove the plugin's (Tablesorter's paging and sorting) hold on the table and then after I get the databack I rebind the plugin. How Do I go about binding and rebinding the tablesorter plugin. Will unbinding release all initialized values in the plugin? This would deactivate the hold of the plugin on the data and create a hold on the fresh set of data. P.S: I do have a way to find out when the new set of table rows are available to apply the plugin, only unsure about the binding unbinding part
0
[ 2, 367, 4772, 43, 279, 10193, 7484, 248, 815, 29, 19006, 108, 857, 13, 5, 546, 19516, 1373, 17, 18163, 14, 487, 8190, 93, 10922, 108, 6, 800, 3726, 3726, 31, 589, 568, 7484, 248, 815, 7775, 6903, 6483, 9, 3014, 839, 7684, 9, 960...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
google maps nongeographical space === Dear Google Maps Friends, I’m wondering if one of you can point me to a Google Maps API V3 code example which solves the following problem: I have a data set with two-dimensional point data which is NOT georeferenced; i.e., the data do NOT refer to locations on the surface of the earth. In my case the data are for documents located in an artificial/synthetic, two-dimensional ‘information’ space. For the moment I am successful in displaying and interacting with these points in the Google Maps API, mapping all points as long/lat coordinates centered on the long/lat coordinate 0:0; i.e., somewhere in the Atlantic Ocean off of the West coast of Africa :-) Although I can get away with this for experimental purposes (the ocean around 0:0 is pretty much empty, so it does not interfere with my visualization), I’d like to adopt a new, abstract coordinate space; essentially replacing Google’s ROAD/TERRAIN/etc. maptype with my own (empty) one. From what I have googled, this can indeed be done and I have seen some impressive DNA/genomics work in which this has in fact been done. But rather than hacking those complex apps, I’d like to see a very simple, base code example where someone plots some arbitrary points in an arbitrary space using the Google API. Can one of you point me to such an example?
0
[ 2, 8144, 6867, 538, 834, 11113, 192, 726, 800, 3726, 3726, 4483, 8144, 6867, 954, 15, 31, 1, 79, 5712, 100, 53, 16, 42, 92, 454, 55, 20, 21, 8144, 6867, 21, 2159, 566, 240, 1797, 823, 56, 8402, 18, 14, 249, 1448, 45, 31, 57, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Not able to run the OpenCL executable on different version of Windows 7 === I have developed a simple image processing OpenCL application on Windows 7 Ultimate, VS2010 and I want to run the .exe file of this application on another system. Basically the platforms are identical(the CPU and the GPU) but OS is Windows 7 Professional. I have just installed the graphics driver on this machine and I want it this way.(No Opencl SDK, no toolkit, no Visual Studio) The application just crashes with the dialog box "Close this application" and no error message. I checked for the OpenCL.dll and it is present in the same location as in the machine in which I developed. I also tried running the executables for all configurations(win32 debug/release, x64 debug/release). I referred this [thread][1] but couldn resolve it. Are there any other files or dlls needed to run it..? [1]: http://stackoverflow.com/questions/9824495/opencl-client-side-requirements
0
[ 2, 52, 777, 20, 485, 14, 368, 5316, 1396, 17194, 5924, 27, 421, 615, 16, 1936, 453, 800, 3726, 3726, 31, 57, 885, 21, 1935, 1961, 5511, 368, 5316, 3010, 27, 1936, 453, 6612, 15, 4611, 2751, 17, 31, 259, 20, 485, 14, 13, 9, 170...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to translate a numpy array to polyphonic music === I want to use an array to play music/sounds. The output music/sounds needs to be polyphonic. I try this. from scipy.io.wavfile import write import numpy as np duration=0.24 amp=1E4 rate=44100 def note(freq, duration, amp, rate): t = np.linspace(0, duration, duration * rate) data = np.sin(2*np.pi*freq*t)*amp return data.astype(np.int16) # two byte integers tone0 = note(0, duration, amp, rate) #silence tone1 = note(261.63, duration, amp, rate) # C4 tone2 = note(329.63, duration, amp, rate) # E4 tone3 = note(392.00, duration, amp, rate) # G4 seq1 = np.concatenate((tone1,tone0,tone0,tone0, tone1),axis=1) seq2 = np.concatenate((tone0,tone2,tone0,tone0, tone2),axis=1) seq3 = np.concatenate((tone0,tone0,tone3,tone0, tone3),axis=1) song = np.dstack((seq1,seq2,seq3)) write('song.wav', 44100, song) I would like to play the song.wav file and hear the notes C, E and G one after the other then a silence and then the C chord (C,E,G notes play at the same time). What I get, instead is an error by the write function. And that ok because the write function (as far as I know it can´t create polyphonic wav files). Just in case the error is Traceback (most recent call last): File "music2.py", line 26, in <module> write('song.wav', 44100, song) File "/usr/lib/python2.7/dist-packages/scipy/io/wavfile.py", line 168, in write fid.write(struct.pack('<ihHIIHH', 16, 1, noc, rate, sbytes, ba, bits)) struct.error: 'I' format requires 0 <= number <= 4294967295 1) Do you know an alternative to the write function that support polyphony? 2) I am open to a complete alternative of my code. The important point is to generate (or play) polyphonic sounds from a numpy array. I am trying to do something like this http://img44.imageshack.us/img44/6182/music.swf, but much more simpler, not GUI, not interactive, just the same idea of a 1 and 0 array were the row have assigned and specific sound/note and the columns code for the time those notes are played.
0
[ 2, 184, 20, 20628, 21, 13, 6336, 6448, 7718, 20, 3446, 22085, 232, 800, 3726, 3726, 31, 259, 20, 275, 40, 7718, 20, 418, 232, 118, 8489, 18, 9, 14, 5196, 232, 118, 8489, 18, 2274, 20, 44, 3446, 22085, 9, 31, 1131, 48, 9, 37, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I tell when to end 'editing mode' on a NSOutlineView when using a custom view for editing the row === I have a NSOutlineTableView (view based) in which I'm using a custom view for editing the row. The custom view itself owned by a NSViewController (so this way I'm able to keep a single NSViewController that manages anything and everything related to editing the row). The custom 'edit view' itself comprises of a number of NSTextFields and NSButtons which at times display popovers or popup windows. Thus the 'first responder' frequently changes when I focus a NSTextField or a NSPopupButton. What I'm essentially trying to achieve is a clean way of finding out *when* to stop editing, i.e. when to remove this custom view from the row and go back to normal non-edit mode. My approach was to make the NSViewController plug itself into the Responder chain and listen to 'firstResponder' change events. On a 'resignFirstResponder' I was hoping to remove this special editing view from the row. However resignFirstResponder immediately gets called on the main managing NSViewController the moment I pass focus to the first NSTextField. I would like the editing to end in case the user clicked on another row, or clicked on the main search field of the app, or clicked on another NSOutlineView (as the window contains a few) and so on. What is the right way of doing this? Right now I've subclassed NSWindow and am listening to all changes to 'makeFirstResponder' and then I go through a known-list of first responder classes that should cause the edit-mode to disappear but this is an ugly hack and I'm sure there's got to be a better way out there. Please help!
0
[ 2, 184, 107, 31, 494, 76, 20, 241, 13, 22, 69, 242, 68, 3740, 22, 27, 21, 13, 2172, 1320, 1143, 4725, 76, 568, 21, 5816, 1418, 26, 9510, 14, 3131, 800, 3726, 3726, 31, 57, 21, 13, 2172, 1320, 1143, 5924, 4725, 13, 5, 4725, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
URL Re-Write using C# === I am working on asp.net website ( VS 2010, Framework 4.0 ) . How can i re write the URL of a page using c# ? Is there is any third party tools available? Can anyone help me on this?
4
[ 2, 287, 6362, 302, 8, 23716, 568, 272, 5910, 800, 3726, 3726, 31, 589, 638, 27, 28, 306, 9, 2328, 2271, 13, 5, 4611, 498, 15, 6596, 268, 9, 387, 13, 6, 13, 9, 184, 92, 31, 302, 2757, 14, 287, 6362, 16, 21, 2478, 568, 272, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Notify user to login on clear the browser cache === <p> Hi I am working on a web-application which deals which jQuery,Javascript,Html as a part of UI. we have login authentication which will ask for username and password.<br>so my question is how to notify the user automatically to login into my application, when user will clear the cache. for example: do login into facebook. after login clear the cache of browser. instantly you will get a notification to login again. please help me out. </p>
0
[ 2, 52, 8612, 4155, 20, 6738, 108, 27, 1207, 14, 16495, 16522, 800, 3726, 3726, 13, 1, 306, 1, 4148, 31, 589, 638, 27, 21, 2741, 8, 2552, 20669, 56, 10342, 56, 487, 8190, 93, 15, 1004, 1385, 8741, 15, 15895, 28, 21, 141, 16, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ninject in ASP.NET MVC4 === So after much screwing around I finally got Ninject wired in and compiling in my MVC4 application. The problem I was running into is the IDependencyScope interface no longer exists from what I can tell and the System.Web.Http.Dependencies namespace was done away with. So, my problem now is I have everything wired in and upon running the application I get: Sequence contains no elements [InvalidOperationException: Sequence contains no elements] System.Linq.Enumerable.Single(IEnumerable`1 source) +379 Ninject.Web.Mvc.NinjectMvcHttpApplicationPlugin.Start() in c:\Projects\Ninject\ninject.web.mvc\mvc3\src\Ninject.Web.Mvc\NinjectMvcHttpApplicationPlugin.cs:53 Ninject.Web.Common.Bootstrapper.<Initialize>b__0(INinjectHttpApplicationPlugin c) in c:\Projects\Ninject\Ninject.Web.Common\src\Ninject.Web.Common\Bootstrapper.cs:52 Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map(IEnumerable`1 series, Action`1 action) in c:\Projects\Ninject\ninject\src\Ninject\Infrastructure\Language\ExtensionsForIEnumerableOfT.cs:31 Ninject.Web.Common.Bootstrapper.Initialize(Func`1 createKernelCallback) in c:\Projects\Ninject\Ninject.Web.Common\src\Ninject.Web.Common\Bootstrapper.cs:53 Ninject.Web.Common.NinjectHttpApplication.Application_Start() in c:\Projects\Ninject\Ninject.Web.Common\src\Ninject.Web.Common\NinjectHttpApplication.cs:81 Which I haven't been able to track down or even begin to fathom where it is coming from. My standard Ninject methods inside the Global.asax.cs look as follows: protected override IKernel CreateKernel() { var kernel = new StandardKernel(); kernel.Load(Assembly.GetExecutingAssembly()); kernel.Bind<IRenderHelper>().To<RenderHelper>(); GlobalConfiguration.Configuration.ServiceResolver.SetResolver(new NinjectDependencyResolver(kernel)); return kernel; } protected override void OnApplicationStarted() { base.OnApplicationStarted(); AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); BundleTable.Bundles.RegisterTemplateBundles(); } And my custom resolver: public class NinjectDependencyResolver : IDependencyResolver { private readonly IKernel _kernel; public NinjectDependencyResolver(IKernel kernel) { _kernel = kernel; } public object GetService(Type serviceType) { return _kernel.TryGet(serviceType); } public IEnumerable<object> GetServices(Type serviceType) { try { return _kernel.GetAll(serviceType); } catch (Exception) { return new List<object>(); } } public void Dispose() { // When BeginScope returns 'this', the Dispose method must be a no-op. } } Any insight here would be greatly appreciated. I've spent far too much time already trying to get any DI framework wired into the latest MVC4 RC running on .NET 4.5 and have now just reached my tolerance level for things just not working at all..
0
[ 2, 13, 5703, 17759, 19, 28, 306, 9, 2328, 307, 8990, 300, 800, 3726, 3726, 86, 75, 212, 8513, 68, 140, 31, 722, 330, 13, 5703, 17759, 21124, 19, 17, 24378, 19, 51, 307, 8990, 300, 3010, 9, 14, 1448, 31, 23, 946, 77, 25, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
c# Thread won't sleep? === I have this code : void Main() { System.Timers.Timer t = new System.Timers.Timer (1000); t.Enabled=true; t.Elapsed+= (sender, args) =>c(); Console.ReadLine(); } int h=0; public void c() { h++; new Thread(() => doWork(h)).Start(); } public void doWork(int h) { Thread.Sleep(3000); h.Dump(); } I wanted to see what happens if the interval is 1000 ms and the job process is 3000 ms. However I saw a strange behavior - the 3000 ms delay occurs *only at the start* ! How can i make each `doWork` - to sleep 3000 ms ? as you can see here - at the beginning there is a 3 sec delay , and then , iterates each 1 sec. ![enter image description here][1] [1]: http://i.stack.imgur.com/IdBVV.gif
0
[ 2, 272, 5910, 9322, 230, 22, 38, 1742, 60, 800, 3726, 3726, 31, 57, 48, 1797, 13, 45, 11364, 407, 5, 6, 13, 1, 329, 9, 891, 1224, 9, 891, 139, 13, 38, 800, 78, 329, 9, 891, 1224, 9, 891, 139, 13, 5, 19484, 6, 73, 13, 38,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
RowEditEnding event in datagrid === private void dataGrid1_RowEditEnding(object sender, DataGridRowEditEndingEventArgs e) { } how get row value and row index?
3
[ 2, 3131, 69, 242, 7601, 807, 19, 1054, 16375, 800, 3726, 3726, 932, 11364, 1054, 16375, 165, 1, 5417, 69, 242, 7601, 5, 23793, 2660, 106, 15, 1054, 16375, 5417, 69, 242, 7601, 4943, 38, 10663, 18, 13, 62, 6, 13, 1, 13, 1, 184, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Sql select query returning Resource id #4 === I wrote the following code to select text from database,but when i echo the output it giving output as Resource id #4 mysql_select_db("xxxxx", $link); $q = "SELECT start_of FROM `qr_table` WHERE id_qr =1"; $result = mysql_query ($q, $link); echo $result; i am new to sql,forgive me if its a stupid questain Thanks in advance
0
[ 2, 4444, 255, 5407, 25597, 2485, 6577, 4924, 14048, 800, 3726, 3726, 31, 738, 14, 249, 1797, 20, 5407, 1854, 37, 6018, 15, 811, 76, 31, 8117, 14, 5196, 32, 1438, 5196, 28, 6577, 4924, 14048, 51, 18, 22402, 1, 18, 16964, 1, 9007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Symfony2 - Confused with FOSUser SonataUser and my extension === I followed official tutorials to install FOSUser then SonataUser bundles and my app/Application/Sonata/UserBundle/Entity extension. Now I'm having 4 tables: fos_user, fos_user_group, fos_user_user and fos_user_user_group. #my config.yml security: providers: fos_userbundle: id: fos_user.user_manager So users are authenticated with fos_user but sonata admin shows users from fos_user_user/ What could be wrong in my config ?
0
[ 2, 13, 7261, 10229, 93, 135, 13, 8, 4230, 29, 4310, 18, 16704, 13959, 16704, 17, 51, 3896, 800, 3726, 3726, 31, 709, 989, 29724, 18, 20, 16146, 4310, 18, 16704, 94, 13959, 16704, 10194, 18, 17, 51, 4865, 118, 2552, 20669, 118, 528...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
EXTJS XTemplate === I have a method as follows : createTip : function() { var eventTip = new Ext.XTemplate( '<tpl if="EventType == \'ONE\'">', '<p> This is event one </p>', '</tpl>' ); return eventTip; } What I want to do is if the EventType is 'TWO', to make the method return null. Is this possible? Thanks.
0
[ 2, 1396, 38, 728, 18, 993, 9577, 6554, 800, 3726, 3726, 31, 57, 21, 2109, 28, 2415, 13, 45, 1600, 10169, 13, 45, 1990, 5, 6, 13, 1, 4033, 807, 10169, 800, 78, 1396, 38, 9, 396, 9577, 6554, 5, 13, 22, 1, 38, 5727, 100, 3726, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
App is considered spammy. Only 4 spam reports out of 110.000 views === So our app has been running for 3 days now. About 1300 "plays" have been made and each play (with a maximum of 3 per day) posts an update to the users stream (if they allowed this). This message is basically the usual "I've played this game and got this score". In total all of these updates have been viewed 110.000 times by Facebook users, of which only 4 people reported it as "spam". Though the "Negative feedback" section of our app's stats indicates that our app is considered to be "spammy" and that we are in immediate danger of being restricted. Complete message: "Warning level red: your app is considered spammy and is in immediate danger of being restricted. Look at your Insights metrics to see what may have caused this." Now, to me atleast, it doesn't seem a lot to get 4 spam reports per 100K views. Can I safely ignore this message or is this something to take action on? Even if I should take action, what can I do? I can't prevent people from considering the update "spam" and the user who posted it explicitly allowed us to do so. Am I missing another statistic I should be looking at?
0
[ 2, 4865, 25, 724, 6954, 79, 915, 9, 104, 268, 6954, 79, 2813, 70, 16, 7896, 9, 3993, 4146, 800, 3726, 3726, 86, 318, 4865, 63, 74, 946, 26, 203, 509, 130, 9, 88, 23635, 13, 7, 5438, 18, 7, 57, 74, 117, 17, 206, 418, 13, 5,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL not working properly === i have this query but this shows column does not exist SELECT p.content, (select count(*) from share_member WHERE username='pratik' AND share_id=share) as allow FROM posts p WHERE allow >="1" and i got this error Unknown column 'allow' in 'where clause'
0
[ 2, 4444, 255, 52, 638, 7428, 800, 3726, 3726, 31, 57, 48, 25597, 47, 48, 1285, 4698, 630, 52, 3182, 5407, 351, 9, 25424, 15, 13, 5, 18, 16964, 2468, 5, 2483, 6, 37, 1891, 1, 6990, 113, 4155, 7259, 3726, 22, 7310, 11571, 22, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Scroll listview === I want to scroll listview.But Listview only scrolls when item of listview exceeded the length of screen .But I want to scroll listview whether listview have one item or ten.I have used this code but it's not working,also have searched a lot but there is no tutorial about this found.So please suggest me how to do this. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:paddingTop="10dp" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:weightSum="100" > <EditText android:id="@+id/etSearch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="98" android:background="@drawable/search_shape" android:cursorVisible="false" android:gravity="center" android:imeOptions="actionSearch" android:singleLine="true" > </EditText> <Button android:id="@+id/SearchBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="2" android:background="@drawable/search_selector" /> </LinearLayout> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" > <ListView android:id="@+id/listView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_above="@+id/moreBtn" android:layout_below="@+id/etSearch" android:scrollbarStyle="outsideInset" android:layout_marginTop="10dp" > </ListView> <Button android:id="@+id/moreBtn" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="@drawable/more_selector" android:visibility="gone" /> <ProgressBar android:id="@+id/progressBar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:visibility="invisible" /> </RelativeLayout> </LinearLayout>
0
[ 2, 12159, 968, 4725, 800, 3726, 3726, 31, 259, 20, 12159, 968, 4725, 9, 811, 968, 4725, 104, 12159, 18, 76, 9101, 16, 968, 4725, 17365, 14, 1476, 16, 2324, 13, 9, 811, 31, 259, 20, 12159, 968, 4725, 1472, 968, 4725, 57, 53, 9101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to remove links from a html content using php === I have the following html content: <p>My name is <a href="way2project">way2project</a></p> Now I want this text as <p>My name is way2project</p> Is there any way to do this? Please help me thanks I used preg_replace but in vain. Thanks again
0
[ 2, 184, 20, 4681, 6271, 37, 21, 13, 15895, 2331, 568, 13, 26120, 800, 3726, 3726, 31, 57, 14, 249, 13, 15895, 2331, 45, 13, 1, 306, 1, 915, 204, 25, 13, 1, 58, 746, 14057, 3726, 7, 1443, 135, 21011, 7, 1, 1443, 135, 21011, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why OutOfMemroyError does not generated? === I have my java-written application being "killed" after some time of work. Java application is started from SH script under Linux, which is running for some time. After then the PID displayed and "killed" word said. Like this: runMyServer.sh: line 3: 3593 Killed java -Xmx2024m -cp ... There is information about out of memory event in the system log. So it looks like out of memory error. My question is: when OutOfMemroyError exception can be not generating?
0
[ 2, 483, 70, 1041, 790, 79, 7592, 29992, 630, 52, 6756, 60, 800, 3726, 3726, 31, 57, 51, 8247, 8, 6390, 3010, 142, 13, 7, 7577, 69, 7, 75, 109, 85, 16, 170, 9, 8247, 3010, 25, 373, 37, 5527, 3884, 131, 13024, 15, 56, 25, 946,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Displaying only names of files in listview === In my app I m creating some files and storing dem in cache dir.now from app only I want to access dis files so i get dem in a listview by giving the path [getExternalCacheDir().getAbsolutePath()]..I get listview.. But in listview the whole path of files is displayed. Instead I just want the file name in list.. Can somebody Help..
0
[ 2, 17418, 104, 1817, 16, 6488, 19, 968, 4725, 800, 3726, 3726, 19, 51, 4865, 31, 307, 2936, 109, 6488, 17, 25615, 11169, 19, 16522, 13, 9035, 9, 1387, 37, 4865, 104, 31, 259, 20, 1381, 1460, 6488, 86, 31, 164, 11169, 19, 21, 968...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails Activerecord querying has_many :through === Need some help with Activerecord Querying in a has_many :through association. Model: **Job** class Job < ActiveRecord::Base has_many :job_metadata, :dependent => :destroy has_many :metadata, :through => :job_metadata **Metadatum** class Metadatum < ActiveRecord::Base attr_accessible :description, :metadata_type_id has_one :metadatum_type has_many :job_metadata, :dependent => :destroy has_many :jobs, :through => :job_metadata **MetadatumType** class MetadatumType < ActiveRecord::Base attr_accessible :description has_many :metada **JobMetadatum** class JobMetadatum < ActiveRecord::Base attr_accessible :job_id, :metadatum_id belongs_to :job belongs_to :metadatum In the console, I can run: @job.metadata which returns => [#<Metadatum id: 2, description: "Part Time", metadatum_type_id: 1, created_at: "2012-06-23 20:42:14", updated_at: "2012-06-23 20:42:14">] But how would I return the metadatum_id on @jobs.metadata which have a **metadatum_type_id** = 1? I'm trying this: @job.metadata.metadatum_id.where('metadata.metadatum_type_id' => 1) But getting the following error: NoMethodError: Metadatum Load (0.3ms) SELECT "metadata".* FROM "metadata" INNER JOIN "job_metadata" ON "metadata"."id" = "job_metadata"."metadatum_id" WHERE "job_metadata"."job_id" = 31 undefined method `metadatum_id' for #<ActiveRecord::Relation:0x007f7fb3188de8>
0
[ 2, 2240, 18, 1348, 14953, 25597, 68, 63, 1, 14842, 13, 45, 11639, 800, 3726, 3726, 376, 109, 448, 29, 1348, 14953, 25597, 68, 19, 21, 63, 1, 14842, 13, 45, 11639, 607, 9, 1061, 45, 13, 1409, 1636, 220, 1409, 718, 1205, 13, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Django: URL ending in a dot === I want to serve a URL that ends in a dot at my Apache + Django (via mod_wsgi) site. The error I receive when the URL is requested is: AssertionError at /adir$/company/Ends in Dot/ No exception supplied Request Method: GET Request URL: https://xxxxx/adir$/company/Ends%20in%20Dot%20./adir$/company/Ends%20in%20Dot/ Django Version: 1.4 Exception Type: AssertionError Exception Location: C:\Python27\lib\site-packages\win32\lib\pywintypes.py in __import_pywin32_system_module__, line 114 Python Executable: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe Python Version: 2.7.3 The URL that I'm actually requesting is: https://xxxx/adir$/company/Ends%20in%20Dot%20./ The matching URL regex is: url(r'^adir\$/company/(.*)/$', 'web.views.adirViewCompany'), The Django web server itself serves the page just fine. Thanks.
0
[ 2, 3857, 14541, 45, 287, 6362, 3119, 19, 21, 14123, 800, 3726, 3726, 31, 259, 20, 1884, 21, 287, 6362, 30, 3451, 19, 21, 14123, 35, 51, 17140, 2754, 3857, 14541, 13, 5, 5034, 7226, 1, 10268, 2234, 6, 689, 9, 14, 7019, 31, 2588, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
raise button click at code behind using jquery === This is my code $.ajax({ type: "POST", url: "3.aspx/GetEmailId", contentType: "application/json; charset=utf-8", data: "{'campGuid':'" + basePage.getParameterByName("g") + "',mt:'" + basePage.getParameterByName("mt") + "'}", dataType: "json", success: function (returndata) { var campEmailID = returndata.d.split(',')[0]; var clientID = returndata.d.split(',')[1]; $("[id$='lnkbtnConStep2']").live("click", lnkbtnConStep2_Click); window.open("/editor/el.aspx?e=" + campEmailID + "&tid=0&cid=" + clientID + "&subj=" + $("#tbxSubject").val()); } }); in button click i need to save some data and paralally need to open aspx page in new browser window can u please tell me Thanks in advance
1
[ 2, 3972, 5167, 10840, 35, 1797, 439, 568, 487, 8190, 93, 800, 3726, 3726, 48, 25, 51, 1797, 5579, 9, 6881, 7522, 5, 1, 1001, 45, 13, 7, 6962, 7, 15, 287, 6362, 45, 13, 7, 240, 9, 472, 306, 396, 118, 3060, 62, 8079, 1340, 7, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Add a string to a input from form === So, I am a real beginner in js and I have a form with 2 inputs. In this inputs I have date pickers so that the user can select a date from a calendar. But the db from the site I work on has this date format: Y M D 0000:00:00. I want to add those zeros at the end automatically when a user selects a date. Don't know if anyone can help, but thanks. window.onload = function(){ new JsDatePick({ useMode:2, target:"inputField", dateFormat:"%Y-%M-%d" }); new JsDatePick({ useMode:2, target:"inputField2", dateFormat:"%Y-%M-%d" }); }; <form action="insert.php" method="post" target="000:00:00 "onsubmit="return validateForm(this)"> <label for="FUP start date">FUP start date:</label> <input type="text" name="inputField" id="inputField"/> </br> </br> <label for="FUP end date">FUP end date:&nbsp;</label> <input type="text" name="inputField2" id="inputField2" />
0
[ 2, 3547, 21, 3724, 20, 21, 6367, 37, 505, 800, 3726, 3726, 86, 15, 31, 589, 21, 683, 26931, 19, 487, 18, 17, 31, 57, 21, 505, 29, 172, 6367, 18, 9, 19, 48, 6367, 18, 31, 57, 1231, 2036, 445, 86, 30, 14, 4155, 92, 5407, 21,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Redirect required to access user data error - Rails Photobucket API === I am working in a Rails app to upload image from my Rails app to Photobucket using api. I found a way to authorize a user from Rails app and get the respective OAuth_token and OAuth_secret from Photobucket. But when i try to upload image to an album, it shows like below error `{"status":"Exception", "message":"Redirect required to access user data","code":301,"content":{"subdomain":"http://api2323.photobucket.com","url":"http://api2323.photobucket.com/album/sethk/upload"},"format":"json","method":"POST","timestamp":1342606351}` @consumer = OAuth::Consumer.new( "consumer_token", "consumer_key", { :site => "http://api.photobucket.com", :scheme => :header, :request_token_path => '/login/request', :authorize_path => '/apilogin/login', :access_token_path => '/login/access', :time => Time.now }) @access = OAuth::AccessToken.new(@consumer, "Retrieved_OAUTH_TOKEN", "Retrieved_OAUTH_KEY") @resp = @access.post("/album/sethk/upload", { :format=>"json", :type=>'url', :imageUrl=>'http://www.google.com/intl/en_ALL/images/logo.gif' } ) render :json => JSON.parse(@resp.body) **Note : sethk is the user name.** Please suggest me on this issue, i have been stuck for 2 days in this. Thanks, Balan
0
[ 2, 302, 14706, 1390, 20, 1381, 4155, 1054, 7019, 13, 8, 2240, 18, 3056, 11925, 1198, 21, 2159, 800, 3726, 3726, 31, 589, 638, 19, 21, 2240, 18, 4865, 20, 71, 8294, 1961, 37, 51, 2240, 18, 4865, 20, 3056, 11925, 1198, 568, 21, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Combine two lists into csv === I have two files, a.txt and b.txt. Let's say:<br> - a.txt contains:<br> 123<br> 234<br> 345<br> 456<br> <br> - and b.txt contains<br> 012<br> 023<br> 034<br> 045<br> <br> I need to combine them into the following:<br> 123,012<br> 234,023<br> 345,034<br> 456,045<br> <br> Any idea on how can I do it in basic sh?
0
[ 2, 12287, 81, 7227, 77, 272, 18, 710, 800, 3726, 3726, 31, 57, 81, 6488, 15, 21, 9, 38, 396, 38, 17, 334, 9, 38, 396, 38, 9, 408, 22, 18, 395, 45, 1, 5145, 1, 13, 8, 21, 9, 38, 396, 38, 1588, 45, 1, 5145, 1, 390, 240, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
For each IP, there is only one ARP (Mac adress)? === I read a book about IP & MAC adresses. As I understand, we use ARP in order to find the MAC adress of the PC. My question is if there is only one MAC adress for each IP's adress? and if so, why we need the IP adress? Why we can't easily go to the MAC adress? Thanks.
0
[ 2, 26, 206, 15735, 15, 80, 25, 104, 53, 21, 6952, 13, 5, 6893, 21, 19137, 18, 6, 60, 800, 3726, 3726, 31, 1302, 21, 360, 88, 15735, 279, 1572, 21, 19137, 7202, 9, 28, 31, 1369, 15, 95, 275, 21, 6952, 19, 389, 20, 477, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android: compile error Util.toByteArray (taken from an example) === I am trying to compile this sample of code in my Android app to have crypt/decrypt feature. I found that code here http://apachejava.blogspot.it/2012/04/androidencryption-made-easy.html I don't know if it's good but that's not relevant here. When compiling it's all OK but Util.toByteArray calls: I get "Util cannot be resolved". Replacing Util with Utils is not any useful. Any help?
0
[ 2, 13005, 45, 26561, 7019, 13, 14255, 9, 262, 23246, 8576, 93, 13, 5, 4386, 103, 37, 40, 823, 6, 800, 3726, 3726, 31, 589, 749, 20, 26561, 48, 5717, 16, 1797, 19, 51, 13005, 4865, 20, 57, 13, 11435, 118, 546, 11435, 1580, 9, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Editing files from different git branches === I am verry new to git. I cloned a project on my local server and I edit my files with TextMate. So, I had a branch called master. Then I created a second branch called local. I made somes modifications, added some files and commited them all. But now when I go back to my master branch, I am unable to edit with TextMate the ancient files (non modified master branch files). How is it possible to fix that? Am I supposed not to use TextMate? Best, Mehdi
0
[ 2, 9510, 6488, 37, 421, 13, 10404, 4395, 800, 3726, 3726, 31, 589, 2494, 622, 78, 20, 13, 10404, 9, 31, 13871, 43, 21, 669, 27, 51, 375, 8128, 17, 31, 9392, 51, 6488, 29, 1854, 5281, 9, 86, 15, 31, 41, 21, 1686, 227, 1129, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
php xml into as3 === I can't find out how to get some data from a PHP file across into Flash AS3. I can get a simple string across, however my data is XML data pulled from a database. I need the xml to be brought into AS3 and then I can forceDownload from within flash. This is my php line which grabs the two columns of data. list($data, $name) = mysql_fetch_array($queryDownload); The $data is the XML code and $name is the name of the file. How do I send that to AS3 in a way that keeps the data as XML data? and get AS3 to use that to create a downloadable file?
0
[ 2, 13, 26120, 23504, 77, 28, 240, 800, 3726, 3726, 31, 92, 22, 38, 477, 70, 184, 20, 164, 109, 1054, 37, 21, 13, 26120, 3893, 464, 77, 4433, 28, 240, 9, 31, 92, 164, 21, 1935, 3724, 464, 15, 207, 51, 1054, 25, 23504, 1054, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
tt_news: use news title as download title in list view === My news should not contain any text, except for the title. Instead, in the list view the title should directly point to the first attached file (a PDF). Now I thought the simplest solution for that would be to hide the title, show only the attached files and give them the title of the related news entry via TypoScript. For the detail view this code works fine: plugin.tt_news.newsFiles { labelStdWrap.cObject = TEXT labelStdWrap.cObject.dataWrap = DB:tt_news:{GPvar:tx_ttnews|tt_news}:title labelStdWrap.cObject.wrap3 = {|} labelStdWrap.cObject.insertData = 1 } ...but it uses the GPvar for the currently displayed news, which of course is not present in list view. **So my question is: how do I get the ID of the currently iterated news entry, if possible at all?** I am open to other solutions as well.
0
[ 2, 13, 38, 38, 1, 14962, 45, 275, 996, 581, 28, 7121, 581, 19, 968, 1418, 800, 3726, 3726, 51, 996, 378, 52, 3717, 186, 1854, 15, 1613, 26, 14, 581, 9, 700, 15, 19, 14, 968, 1418, 14, 581, 378, 1703, 454, 20, 14, 64, 3638, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Return address on touch(android) === I'm trying to return the address of a certain location after touching the screen for over 1500 ms and ticking the button. Yet, after adding the required code, the application crashes. The code for the buttons works, but not for retrieving the the address. Could anyone help me with this? Thank you! class Touch extends Overlay{ @Override public boolean onTouchEvent(MotionEvent e, MapView m){ if (e.getAction() == MotionEvent.ACTION_DOWN){ start = e.getEventTime(); x = (int) e.getX(); y = (int) e.getY(); TouchPoint = mapView.getProjection().fromPixels(x,y); } if (e.getAction() == MotionEvent.ACTION_UP){ stop = e.getEventTime(); } if(stop - start > 1500){ AlertDialog alert = new AlertDialog.Builder(AndroidGoogleMaps.this).create(); alert.setTitle("Pick an option"); alert.setCancelable(true); alert.setButton(DialogInterface.BUTTON_POSITIVE, "Place a pinpoint.", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); alert.setButton(DialogInterface.BUTTON_NEUTRAL, "Address.", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { try{ Geocoder geocoder = new Geocoder(getBaseContext(), Locale.getDefault()); List<Address> address = geocoder.getFromLocation(TouchPoint.getLatitudeE6()/1000000 , TouchPoint.getLongitudeE6()/1000000 , 1); String display =""; if(address.size() > 0){ for(int i = 0; i< address.get(0).getMaxAddressLineIndex(); i++){ display += address.get(0).getAddressLine(i) + "\n"; } Toast.makeText(getBaseContext(), display, Toast.LENGTH_LONG).show(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); alert.show(); return true; } return false; } }
1
[ 2, 788, 3218, 27, 1723, 5, 290, 18524, 6, 800, 3726, 3726, 31, 22, 79, 749, 20, 788, 14, 3218, 16, 21, 1200, 1474, 75, 6652, 14, 2324, 26, 84, 11059, 4235, 17, 8809, 68, 14, 5167, 9, 768, 15, 75, 4721, 14, 1390, 1797, 15, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PDF file not opening === I have Java code to open the pdf file in Java and it is running perfectly. Code is try { File pdfFile = new File("/Users/alkandari/Desktop/SMART/Fahim/test.pdf"); if (pdfFile.exists()) { if (Desktop.isDesktopSupported()) { Desktop.getDesktop().open(pdfFile); } else { System.out.println("Awt Desktop is not supported!"); } } else { System.out.println("File is not exists!"); } System.out.println("Done"); } catch (Exception ex) { ex.printStackTrace(); } However when I put this in some method say `showMyPDFFile()` and try to call that on `commandLink`, pdf doesn't get open. It says `Awt Desktop is not supported!`. <h:commandLink value="View PDF/ DOC" action="#{PersonalInformationDataBean.showMyPDFFile()}" /> Any idea why pdf is not getting opened?
0
[ 2, 13, 11124, 3893, 52, 1214, 800, 3726, 3726, 31, 57, 8247, 1797, 20, 368, 14, 13, 11124, 3893, 19, 8247, 17, 32, 25, 946, 5759, 9, 1797, 25, 1131, 13, 1, 3893, 13, 11124, 16877, 800, 78, 3893, 5, 7, 118, 16704, 18, 118, 192,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Boolean operation in Xpath: Using attributes === Following is a snippet of .xml file. I did following : Document doc = docBuilder.parse(filesInDirectory.get(i)); doc.getDocumentElement().normalize(); XPath xPath = XPathFactory.newInstance().newXPath(); XPathExpression expr1 = xPath.compile("//codes[@ class ='class2']/code[@code]"); Object result1 = expr1.evaluate(doc, XPathConstants.NODESET); NodeList nodes1 = (NodeList) result1; Now, System.out.println("result length"+":"+nodes1.getLength()); returns 2. I would like to make logical decision based on the attribute names, like(pseudocode) if(nodes1.contains(123)) or if(nodes1.contains(123) && nodes1.contains(456)) and make decision. how would i do it? <metadata> <codes class="class1"> <code code="ABC"> <detail "blah" "blah"> </code> </codes> <codes class="class2"> <code code="123"> <detail "blah blah"/> </code> <code code="456"> <detail "blah blah"/> </code> </codes> </metadata>
0
[ 2, 9827, 413, 210, 1453, 19, 993, 8353, 45, 568, 13422, 800, 3726, 3726, 249, 25, 21, 13, 29061, 16, 13, 9, 396, 8184, 3893, 9, 31, 144, 249, 13, 45, 4492, 9765, 800, 9765, 20904, 9, 3574, 870, 5, 16877, 18, 108, 10197, 93, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to change the value of a callBackElement from within a handler function? === I have a handler function that is updating a quite large UI with values from a spreadsheet. The rowindex of the sheet comes from a callbackElement as `e.parameter.hidden` (hidden is the widget that holds the value) and that I increment/decrement in the function. I have another handler function that searches the spreadsheet for a string value and returns a rowindex that I assign to this same hidden widget. If I trigger the 'search' handler *first* and *then* the 'display' handler, I have my UI updated with the 'found' data, which is nice but needs two separate clicks on two distinct buttons. **Now my question :** how could I include in the 'search handler function' a call to the 'display handler' and pass all e.parameters **BUT** modify the value of the `e.parameter.hidden` only ? I know `e` is an object with a lot of keys and values but I don't know how to manipulate just one value in there... The code of the search handler is very short and goes like this : function findname(e){ // this function is called by a handler triggered by a keypress on a textBox var app = UiApp.getActiveApplication(); var hiddenD = app.getElementById('hiddenD'); var str = e.parameter.find ; // find is the textBox's name var found = point(str);// point() is a function that returns the rowindex of the found value hiddenD.setValue(found);// hiddenD is the hidden widget that I want to 'manipulate' nextitem(e);// nextitem is the function that updates the UI and that is normally called by a handler on another button return app } *Well I hope this question is clear enough (this wasn't easy to explain), if not please ask ;-)*
0
[ 2, 25, 32, 938, 20, 753, 14, 1923, 16, 21, 645, 1958, 27567, 37, 363, 21, 24641, 1990, 60, 800, 3726, 3726, 31, 57, 21, 24641, 1990, 30, 25, 71, 43, 1880, 21, 1450, 370, 13, 5661, 29, 4070, 37, 21, 1789, 17627, 9, 14, 3131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WPF Convert C# animation code to storyboard === I have the following method which works. I'd like to put it in a utility method that returns a Storyboard. Every attempt I have made at converting this to a Storyboard has failed, and I've spent a lot of time researching. I'm ready to give up unless someone comes to my rescue. Here's the code I want to convert: public override void Begin(FrameworkElement element, int duration) { var transform = new ScaleTransform(); element.LayoutTransform = transform; var animation = new DoubleAnimation { From = 1, To = 0, Duration = TimeSpan.FromMilliseconds(duration), FillBehavior = FillBehavior.Stop, EasingFunction = new QuinticEase { EasingMode = EasingMode.EaseIn } }; transform.BeginAnimation(ScaleTransform.ScaleXProperty, animation); transform.BeginAnimation(ScaleTransform.ScaleYProperty, animation); } So, instead of the two BeginAnimation() calls, I want to return a Storyboard so all I have to do is call storyboard.Begin(). I know this shouldn't be that hard to do, but I'm just not getting it. Thanks.
0
[ 2, 619, 7721, 8406, 272, 5910, 6236, 1797, 20, 609, 2806, 800, 3726, 3726, 31, 57, 14, 249, 2109, 56, 693, 9, 31, 22, 43, 101, 20, 442, 32, 19, 21, 10082, 2109, 30, 4815, 21, 609, 2806, 9, 352, 1735, 31, 57, 117, 35, 19583, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Django: Static content on very small scale website === I'm working on a very small scale website for my school (less than 100 users a day) and was wondering if there was a way too store static files on the django server instead of deploying a second server to manage static files. Google searches turn up things like the following: https://docs.djangoproject.com/en/dev/howto/static-files/, but I'm wondering if there was a more simple way to do this, even if it wasn't very efficient, on the Django server.
0
[ 2, 3857, 14541, 45, 12038, 2331, 27, 253, 284, 3464, 2271, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 253, 284, 3464, 2271, 26, 51, 116, 13, 5, 923, 119, 808, 3878, 21, 208, 6, 17, 23, 5712, 100, 80, 23, 21, 161, 266, 1718, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
python: how to extract specific lines of data from a big text file === I have a text file that contains something like this: # Comment # Comment # Comment # Comment # Comment Comment # Comment **#Raw SIFs at Crack Propagation Step: 0** # Vertex, X, Y, Z, K_I, K_II, 0 , 2.100000e+00 , 2.000000e+00 , -1.000000e-04 , 0.000000e+00 , 0.000000e+00 , 1 , 2.100000e+00 , 2.000000e+00 , 1.699733e-01 , 8.727065e+00 , -8.696262e-04 , 2 , 2.100000e+00 , 2.000000e+00 , 3.367067e-01 , 8.907810e+00 , -2.548819e-04 , **# MLS SIFs at Crack Propagation Step: 0** # MLS approximation: # Sample, t, NA, NA, K_I, K_II, # Crack front stretch: 0 0 , 0.000000e+00 , 0.000000e+00 , 0.000000e+00 , 8.446880e+00 , -1.360875e-03 , 1 , 5.670333e-02 , 0.000000e+00 , 0.000000e+00 , 8.554168e+00 , -1.156931e-03 , 2 , 1.134067e-01 , 0.000000e+00 , 0.000000e+00 , 8.648241e+00 , -9.755573e-04 , # more comments more comments # more comments **# Raw SIFs at Crack Propagation Step: 1** # Vertex, X, Y, Z, K_I, K_II, 0 , 2.186139e+00 , 2.000000e+00 , -1.688418e-03 , 0.000000e+00 , 0.000000e+00 , 1 , 2.192003e+00 , 2.000000e+00 , 1.646902e-01 , 9.571022e+00 , 4.770358e-03 , 2 , 2.196234e+00 , 2.000000e+00 , 3.319183e-01 , 9.693934e+00 , -9.634989e-03 , **# MLS SIFs at Crack Propagation Step: 1** # MLS approximation: # Sample, t, NA, NA, K_I, K_II, # Crack front stretch: 0 0 , 0.000000e+00 , 0.000000e+00 , 0.000000e+00 , 9.402031e+00 , 2.097959e-02 , 1 , 5.546786e-02 , 0.000000e+00 , 0.000000e+00 , 9.467541e+00 , 1.443546e-02 , 2 , 1.109357e-01 , 0.000000e+00 , 0.000000e+00 , 9.525021e+00 , 8.554051e-03 , As you can see, the lines without the # symbol contains the data I would like to plot. I've only shown you a short portion of step 0 and step 1, but there are around 20 steps in this file. And in each step, there are two types of data: RAW SIFS and MLS SIFS. For each section of data, I would like to plot a line graph of: vertex (1st column) versus K_I (5th column), and vertex (1st column) versus K_II (6th column) So, in the end I would like the 20 steps of **RAW SIFS** for vertex vs K_I with 20 curves all in one graph. Then, another graph of the 20 steps of **RAW SIFS** for vertex vs K_II. Similarly, I would like the 20 steps of **MLS SIFS** for vertex vs K_I with 20 curves all in one graph. Then, another graph of the 20 steps of **MLS SIFS** for vertex vs K_II. So far, I created a seperate text file where I just have one section of the original file. So for the **Raw SIFs at Crack Propagation Step: 0** section, the code I have written uses numpy.loadtxt() to read the file: import numpy with open("numfile.txt") as RawStep0: Vertex, K_I, K_II = numpy.loadtxt(RawStep0, usecols = (0, 4, 5), dtype = float, delimiter=" , ", skiprows = 2, unpack = True) my output ---> Vertex = array([ 0., 1., 2.]) K_I = array([0. , 8.727065, 8.90781]) How do I go about writing the code for the original file without the need to create seperate files for each section? How can I skip all those rows with the # symbol and create the arrays I need to plot?
0
[ 2, 20059, 45, 184, 20, 10962, 1903, 1560, 16, 1054, 37, 21, 580, 1854, 3893, 800, 3726, 3726, 31, 57, 21, 1854, 3893, 30, 1588, 301, 101, 48, 45, 6926, 6484, 6926, 6484, 6926, 6484, 6926, 6484, 6926, 6484, 6484, 6926, 6484, 13, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
News don't show up after TYPO3 reinstall === After a server crash, I had to re-install TYPO3 using my latest database backup. While I was at it, I upgraded TYPO3 from whatever I installed about half a year ago to 4.7.2 and, consequently, also had to use a newer tt_news module (3.2.1). Unfortunately, none of the news sections on my site show up now. All it says where they should be in the HTML code is: <!-- CONTENT ELEMENT, uid:24/list [begin] --> <div id="c24" class="csc-default"> <!-- Plugin inserted: [begin] --> <!-- Plugin inserted: [end] --> </div> <!-- CONTENT ELEMENT, uid:24/list [end] --> I did update the database when I installed the plugin and clicked the link for the updater script on the plugin's configuration page, although it didn't seem to do anything. I'm really new to TYPO3, so I can't be sure it's nothing with the HTML template, which I had to reconstruct from scratch. Also, I'm not really sure yet how you would get an idea of what's going on (or wrong) in cases like this in TYPO3.
0
[ 2, 996, 221, 22, 38, 298, 71, 75, 22550, 240, 7102, 21300, 800, 3726, 3726, 75, 21, 8128, 4597, 15, 31, 41, 20, 302, 8, 108, 21300, 22550, 240, 568, 51, 5736, 6018, 10119, 9, 133, 31, 23, 35, 32, 15, 31, 9958, 22550, 240, 37, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JQUERY slideDown === first time I'm using this service to ask a question, however, have found many answers on here before by reading previous posts. I'm hoping you can help me, I have a .click event where I want a hidden div to slide down. I have achieved this, but rather than using a toggle and have it slide up on the additional click, I will like it to slide down. So, rather than slide down, slide up I want it to slide down and then slide down again. This is the code I am currently using, until I manage to achieve the effect/animation I want: $(document).ready(function() { $(".whereami").click(function() { $(".currentpage").slideToggle("slow"); }); });
0
[ 2, 487, 8190, 93, 6464, 2968, 800, 3726, 3726, 64, 85, 31, 22, 79, 568, 48, 365, 20, 1349, 21, 1301, 15, 207, 15, 57, 216, 151, 6709, 27, 235, 115, 34, 1876, 1158, 9868, 9, 31, 22, 79, 3935, 42, 92, 448, 55, 15, 31, 57, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mysql shows error when using "IF EXISTS" === I think I have a conflict between my knowledge on SQL Server and MySQL. When I run this query, I get an error always from MySQL: If EXISTS (select * from tbl_admin) THEN select 'OK'; END IF; The error message is: > [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if EXISTS (select * from tbl_admin) then select '1' -- select '1' WHERE EXISTS ' at line 1 Please help me and tell me am I wrong in writing this query? What's wrong? I want to do something if I have something in `tbl_admin` table.
0
[ 2, 51, 18, 22402, 1285, 7019, 76, 568, 13, 7, 821, 5636, 7, 800, 3726, 3726, 31, 277, 31, 57, 21, 2930, 128, 51, 1918, 27, 4444, 255, 8128, 17, 51, 18, 22402, 9, 76, 31, 485, 48, 25597, 15, 31, 164, 40, 7019, 550, 37, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Issue with OAuth authentication for the new Basecamp Api using OAConsumer === My code looks something like this : OAConsumer *consumer = [[OAConsumer alloc] initWithKey:@"my_ClientID" secret:@"my_Secret"]; NSURL *url = [NSURL URLWithString:@"https://launchpad.37signals.com/authorization/token"]; OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url consumer:consumer token:nil // we don't have a Token yet realm:nil // our service provider doesn't specify a realm signatureProvider:nil]; // use the default method, HMAC-SHA1 [request setHTTPMethod:@"POST"]; NSLog(@"USER URL : %@",[request URL]); OADataFetcher *fetcher = [[OADataFetcher alloc] init]; [fetcher fetchDataWithRequest:request delegate:self didFinishSelector:@selector(requestTokenTicket:didFinishWithData:) didFailSelector:@selector(requestTokenTicket:didFailWithError:)]; . - (void)requestTokenTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data { if (ticket.didSucceed) { NSString *responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; OAToken *requestToken = [[OAToken alloc] initWithHTTPResponseBody:responseBody]; NSLog(@"%@",requestToken); } } My Delegate method never gets a (ticket.didSucceed) Success. Can someone tell me what I am missing here? Thanks
0
[ 2, 1513, 29, 635, 1346, 96, 27963, 26, 14, 78, 1000, 8789, 21, 2159, 568, 13, 6941, 12124, 723, 106, 800, 3726, 3726, 51, 1797, 1879, 301, 101, 48, 13, 45, 13, 6941, 12124, 723, 106, 1637, 12124, 723, 106, 800, 636, 2558, 6941, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Apple Push Notification - View Button Action === I have some problems with my Push Notifications. I can sent them well to my registered Devices. All works fine. My Questions is: After clicking the VIEW button, the App is launching. At the moment without any content. How can i add content here? This content should depend on the Push Notification i sent out. For example: My Push Notification is about NEWS XYZ - then after clicking VIEW i should get more informations about NEWS XYZ So i think i must get the news from my website. Perhabs with the ID they are posted on my side. But how to implement this in the App? I mean with every NEW Push Message, the must be shown the NEW News. Also it should be possible to read all previous received NEWS in the App in a list, when getting back from NEWS Number 1. You understand, what i mean? I dont have any real idea...Would be nice if you can show me code regarding to an example. Thanks.
0
[ 2, 4037, 3250, 52, 4634, 13, 8, 1418, 5167, 1028, 800, 3726, 3726, 31, 57, 109, 1716, 29, 51, 3250, 52, 4634, 18, 9, 31, 92, 795, 105, 134, 20, 51, 3801, 4690, 9, 65, 693, 1123, 9, 51, 2346, 25, 45, 75, 25590, 14, 1418, 5167...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Google Chart QR Code - Data is greater than 2k + Asp.net === I am using Google Chart QR code , I have to send data more then 2k , I read document on https://developers.google.com/chart/infographics/docs/qr_codes its says that The data to encode. Data can be digits (0-9), alphanumeric characters, binary bytes data, or Kanji. You cannot mix data types within a QR code. The data must be UTF-8 URL-encoded.Note that URLs have a 2K maximum length, so if you want to encode more than 2K bytes (minus the other URL characters), you will have to send your data using POST. Can any one have sample that how can I send data using POST for Google QR - Code
0
[ 2, 8144, 1795, 2593, 139, 1797, 13, 8, 1054, 25, 1894, 119, 172, 197, 2754, 28, 306, 9, 2328, 800, 3726, 3726, 31, 589, 568, 8144, 1795, 2593, 139, 1797, 13, 15, 31, 57, 20, 2660, 1054, 91, 94, 172, 197, 13, 15, 31, 1302, 4492...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SIFT- image comparison === I am comparing two images using SIFT in java using sift implementation by Stephan Saalfeld-- http://fly.mpi-cbg.de/~saalfeld/Projects/javasift.html. But due to lack of proper example,i am finding difficult in using it. I am able to get the descriptors for the two images, then their corresponding matching descriptors and finally applying RANSAC to neglect the false matches. Now, i am left with a number of inliers. But I am confused how to conclude if two images are similar or not?
0
[ 2, 26865, 8, 1961, 6050, 800, 3726, 3726, 31, 589, 15047, 81, 3502, 568, 26865, 19, 8247, 568, 26865, 6123, 34, 11987, 1929, 192, 5450, 8, 8, 7775, 6903, 9700, 9, 2554, 49, 8, 11849, 263, 9, 546, 118, 1, 1229, 192, 5450, 118, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Change the color of the selected page number in the gridview paging footer === I have a gridview and sqldatasource. Gridview , Paging numbers. When you select the number page in the footer of the gridview it will underline the selected number . - Is there any way of changing the color of the selected number ? Thank you
0
[ 2, 753, 14, 1665, 16, 14, 1704, 2478, 234, 19, 14, 7354, 4725, 19006, 68, 1749, 106, 800, 3726, 3726, 31, 57, 21, 7354, 4725, 17, 4444, 255, 18768, 12097, 9, 7354, 4725, 13, 15, 19006, 68, 2116, 9, 76, 42, 5407, 14, 234, 2478, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Importing 14 digit timestamp from CSV to MySQL and avoid stripping out data === I'm creating a mySQL db that will contain as part of its data, timestamps. These timestamps will be imported from a CSV file in which they appear like this - 20110701083231 My question is which is the best datatype to store these as? In my attempts so far, during the import process (which I am doing via PHPMyAdmin) the end of the timestamp appears to get stripped out and they become 2011070000000. Oddly, when I return to the CSV file, the entries there also appeared to be stripped out in the same way...? Thanks in advance for any light you shed and for all previous help given.
0
[ 2, 9010, 68, 513, 15611, 436, 38, 10158, 37, 272, 18, 710, 20, 51, 18, 22402, 17, 2658, 25105, 70, 1054, 800, 3726, 3726, 31, 22, 79, 2936, 21, 51, 18, 22402, 13, 9007, 30, 129, 3717, 28, 141, 16, 82, 1054, 15, 436, 4919, 1919...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Django App Engine === Will Django App Engine work on Eclipse or do get the same problem as Launcher. I cannot get it working on manage.py runserver - it is always missing a module...
0
[ 2, 3857, 14541, 4865, 1406, 800, 3726, 3726, 129, 3857, 14541, 4865, 1406, 170, 27, 11652, 54, 107, 164, 14, 205, 1448, 28, 19755, 9, 31, 1967, 164, 32, 638, 27, 4705, 9, 6448, 1461, 106, 2304, 13, 8, 32, 25, 550, 2863, 21, 1261...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Set byte[] to download as file === I have a Jasper Report that generates an Excel file and outputs as a byte[], I want the file to appear as a download in the browser but at the moment it just prints the raw code to the browser. The relevant part of the code is below, this is initiated from an AJAX request (the page has already been loaded): JasperReport jasperReport; JasperPrint jasperPrint; HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse(); byte[] excel = null; FacesContext facesContext = FacesContext.getCurrentInstance(); try { ArrayList<SwimDataReport> dataList = getData(); if(dataList!=null){ JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(dataList, false); jasperReport = JasperCompileManager.compileReport(reportFile.getPath()); jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource); JRXlsExporter exporter = new JRXlsExporter(); ByteArrayOutputStream xlsReport = new ByteArrayOutputStream(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, xlsReport); exporter.exportReport(); excel = xlsReport.toByteArray(); response.reset(); response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-disposition", "attachment; filename=\"Export.xls\""); xlsReport.close(); OutputStream ouputStream = response.getOutputStream(); ouputStream.write(excel); ouputStream.close(); facesContext.responseComplete(); this.cleanUp(); }else{ return; } } catch (JRException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } Any ideas where I am going wrong?
0
[ 2, 309, 34, 591, 2558, 500, 20, 7121, 28, 3893, 800, 3726, 3726, 31, 57, 21, 16750, 1330, 30, 7920, 18, 40, 20700, 3893, 17, 5196, 18, 28, 21, 34, 591, 2558, 500, 15, 31, 259, 14, 3893, 20, 1893, 28, 21, 7121, 19, 14, 16495, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Registration confusion Android GCM === I am trying to migrate to `GCM` in Android, `C2DM` now being deprecated. The registration process described [here][1] is different from registration described [here][2]. Are both registration same? Can we see code for `GCMRegistrar` to know for sure? [1]: http://pages.citebite.com/c2g6a5w3wljq [2]: http://pages.citebite.com/i2v6c5g5tkjr
0
[ 2, 8587, 5677, 13005, 489, 9095, 800, 3726, 3726, 31, 589, 749, 20, 22985, 20, 13, 1, 10362, 79, 1, 19, 13005, 15, 13, 1, 150, 135, 43, 79, 1, 130, 142, 121, 3515, 150, 1669, 9, 14, 8587, 953, 745, 636, 6836, 500, 2558, 165, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Magento - SimpleXML_Load_String Error when GBP Sign in Config Table === We have a Magento site running Enterprise Edition 1.12. Whenever a pound sign (£) is entered into the site configuration (i.e. it goes into the core_config_data table) the site is failing with the following error: Warning: simplexml_load_string(): Entity: line 2: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xA3 0x3C 0x2F 0x6E in /var/www/missguided-stage/lib/Varien/Simplexml/Config.php on line 383 The database table itself has a Collation of "utf8_general_ci" Where could we be going wrong?
0
[ 2, 4723, 17050, 13, 8, 1935, 396, 8184, 1, 8294, 1, 11130, 7019, 76, 14857, 306, 1676, 19, 13, 14093, 2816, 859, 800, 3726, 3726, 95, 57, 21, 4723, 17050, 689, 946, 6002, 1322, 137, 9, 918, 9, 6634, 21, 11168, 1676, 13, 5, 11, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Eclipse Juno typing lag on OS X Lion === this is mostly to raise awareness and promote certain bugs on the Eclipse team I guess. Env: - MacOSX 10.7.4 -Eclipse Juno final 64bit - Core2Duo MacBookPro 2009 - SSD main HD. It seems on quite large Java source files (1-2klines), typing of any code anywhere is causing - 1) Extreme CPU load (peaks) - 2) Quite a lag on typing I have tried to disable autocomplete, line printing, and other features, reduce or increase memory settings on eclipse.ini, but nothing resolved it. Anyone else with the same problem? Eclipse Bugzilla search [query][1]. [1]: https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=typing%20lag
0
[ 2, 11652, 21715, 25266, 13, 6828, 27, 13, 759, 993, 6023, 800, 3726, 3726, 48, 25, 1555, 20, 3972, 6457, 17, 3947, 1200, 13925, 27, 14, 11652, 173, 31, 2321, 9, 1957, 710, 45, 13, 8, 1572, 759, 396, 332, 9, 465, 9, 300, 13, 8,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to run PhantomJS from node.js as a command line argument === I was recently going to test out running phantomJS from python as a commandline argument, I haven't got round to it yet but have seen examples. Because PhantomJS is run from the command line this seems to be possible. The result that PhantomJS would spit out would go straight into a variable. Before I go down that path, making this work in node.js would actually be more useful for me and it got me thinking, can i just use to node to run PhantomJS as a program gets run from the commandline and store the data result that PhantomJS would normally spit out into a variable? I would rather not use [phantomjs-node][1] because it seems to be using too many tricks. The reason for all of this is to be able to run PhantomJS at the same time as another action the program takes and use the resulting data its recorded for some other stuff. Simply put, you can run system command line stuff in python, can I do the same in node.js? Cheers :) [1]: https://github.com/sgentle/phantomjs-node
0
[ 2, 25, 32, 938, 20, 485, 11771, 728, 18, 37, 15421, 9, 728, 18, 28, 21, 1202, 293, 5476, 800, 3726, 3726, 31, 23, 1989, 228, 20, 1289, 70, 946, 11771, 728, 18, 37, 20059, 28, 21, 1202, 1143, 5476, 15, 31, 2933, 22, 38, 330, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to create javascript variable with other variable value in name === Hi I need to create a load of variables in a javascript loop so say my loop goes round 5 times starting at 0 by the end of it the following variables should be defined: variable_0 variable_1 variable_2 variable_3 variable_4 Can anyone tell me how to do this please?
0
[ 2, 184, 20, 1600, 8247, 8741, 7612, 29, 89, 7612, 1923, 19, 204, 800, 3726, 3726, 4148, 31, 376, 20, 1600, 21, 6305, 16, 12157, 19, 21, 8247, 8741, 5293, 86, 395, 51, 5293, 1852, 560, 331, 436, 1422, 35, 713, 34, 14, 241, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Hide keyboard by touching background of UITableView === I was searching some optimized method to hide keyboard on background tap when textfields are in a tableviewcell. I have made some code Hope this would help you.
0
[ 2, 3077, 8896, 34, 6652, 2395, 16, 13, 11193, 579, 4725, 800, 3726, 3726, 31, 23, 5792, 109, 22864, 43, 2109, 20, 3077, 8896, 27, 2395, 5526, 76, 1854, 1109, 18, 50, 19, 21, 859, 4725, 9725, 9, 31, 57, 117, 109, 1797, 1376, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How to block a piece of code for multiple processes === As I have installed cron run the same script every minute. At the same time a script is executed several times. There is such a part: $query = mysql_query("select distinct `task_id` from tasks_pending where `checked`='0' and `taken`='0' limit 50"); Then, the obtained values ​​set "taken = 1" Since several processes are executed at the same time the request Return the same data for different processes. Is it possible to somehow disable this part of her time to can perform only one process? Sorry for bad English.
0
[ 2, 184, 20, 1921, 21, 1855, 16, 1797, 26, 1886, 5102, 800, 3726, 3726, 28, 31, 57, 4066, 13, 19587, 485, 14, 205, 3884, 352, 2038, 9, 35, 14, 205, 85, 21, 3884, 25, 5557, 238, 436, 9, 80, 25, 145, 21, 141, 45, 5579, 8190, 93...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Saving context discards changes === I'm having a strange problem. When I save a context in core data the relationships are discarded. For example, if I have a `NSManagedObject` named `map` and I add some other objects via `regions` relationship (one to many), like this countymap.color = [NSNumber numberWithInt:250]; countymap.side = [NSNumber numberWithInt:1]; westregion.map = countymap; eastregion.map = countymap; southregion.map = countymap; NSLog(@"Map color %i", countymap.color); // logs 250 which is correct NSLog(@"Region number %i", countymap.regions); //logs 3, which is correct [context save]; NSLog(@"Map color %i", countymap.color); // logs 250 which is correct NSLog(@"Region number %i", countymap.regions); //logs 0, which is NOT correct As you can see, after I save the context, the relationships I've just created are discarded. I can't find a reason for it. Any help would be appreciated. Thanks!
0
[ 2, 7599, 4141, 26251, 18, 1693, 800, 3726, 3726, 31, 22, 79, 452, 21, 2578, 1448, 9, 76, 31, 2079, 21, 4141, 19, 2884, 1054, 14, 5833, 50, 17032, 9, 26, 823, 15, 100, 31, 57, 21, 13, 1, 2172, 177, 8030, 23793, 1, 377, 13, 1,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I make my webpage scale-able depending on the size of the browser window? === I just made my first [website][1], and I notice that the elements start to look weird and clumped together if the browser window gets too small or so. I was wondering how to make the elements scalable [1]: http://individual.utoronto.ca/andrewlouis Relevant HTML: <!DOCTYPE html> <html> <head> <title>Andrew Louis, University of Toronto</title> <link rel="stylesheet" href="fonts/stylesheet.css" type="text/css" /> <link rel="stylesheet" href="style.css" type="text/css" /> <script src="http://code.jquery.com/jquery-latest.js"></script> <script src="javascript/jqueryscript.js"></script> <script src="javascript/popup.js"></script> <script language="JavaScript"> var i = 0; imageObj = new Image(); images = new Array(); images[0] = "images/book-black.png"; images[1] = "images/male-black.png"; images[2] = "images/telephone-black.png"; //Start preloading for (i = 0; i<=2; i++) { imageObj.src=images[i]; } </script> <body> <div id="heading"> <span class="border">Andrew Louis</span> <div id = "subheading"> <p> <br /><b>Andrew</b> is a big fan of grandiose ideas that propel change, imaginative software,<br /> innovative web design, and caffè americanos.</p> </div> </div> <!-- <div id="footer"> --> <div class="nav_wrapper"> <ul class = "Fade" id="list_orientation"> <li id="about"><a href="AboutMe.html"><img src = "images/male.png" height = '50' width = '50' /></a></li> <li id="port"><a href="Portfolio.html"><img src = "images/book.png" height = '50' width = '50' /></a></li> <li id="contact"><a href="Contact.html"><img src = "images/telephone.png" height = '50' width = '50' /></a></li> </ul> </div> <!-- </div> --> </body> </html> Relevant CSS: .Chunk{ font-family:'ChunkFiveRomanRegular'; } .Museo{ font-family:'MuseoSlab500Regular'; font-size:20px; } .nav_wrapper { position:fixed; color:#000; left: -100px; right: 0px; bottom: 0px; text-align:center; height:225px; /*background:white; border-style:dotted;*/ } .global_nav{ position:fixed; float:bottom; padding:5px; color:#000; left: 0px; right: 0px; bottom: 0px; text-align:center; height:17px; font-size:10px; background:white; } #portfolio_text{ text-align:center; } #heading{ font-family:'Lobster1.3Regular'; color:#D04D21; position: absolute; font-size:80px; top: 10%; left: 0px; width: 100%; height: 1px; text-align:center; text-shadow: 0 0 2px rgba(0,0,0,0.9); } .border{ border-top: 1px solid #D04D21;/*#000000;*/ border-bottom:1px solid #D04D21;/*#000000;*/ padding:20px; } .rounded_border{ border:2px dashed; padding:10px 40px; border-radius:25px; } body{ background:#FFFFFF; } #subheading{ font-family:'MuseoSlab500Regular'; text-align:center; font-size:25px; text-shadow: 0 0 1px rgba(0,0,0,0.1); } #list_orientation li a { text-decoration:none; text-align:center; color:black; } #list_orientation li{ display:inline-block; padding:50px; height:50px;width:50px; text-align:center; width:20%; margin-left:3%; } .Fade img{ border-style:dotted; /* opacity:0.4; padding:10px; padding-bottom:20px;*/ background:white; border-color:#D04D21; padding: 2em 2em 2em 2em; -moz-border-radius: 5em; -webkit-border-radius: 5em; border-radius: 5em; } .Fade img:hover{ background:#D04D21; border-color:white; } #pup { position:absolute; z-index:200; /* aaaalways on top*/ text-align:center; font-family:'ChunkFiveRomanRegular'; padding: 3px; margin-left: 10px; margin-top: -5px; width: 120px; border: 1px solid black; background-color:white; color: #D04D21; opacity:0.9; font-size: 1em;/*0.95em;*/ } .Entypo{ font-family:'EntypoRegular'; font-size:100px; } a{ text-decoration:none; color:#D04D21; }
0
[ 2, 184, 107, 31, 233, 51, 2741, 6486, 3464, 8, 579, 4758, 27, 14, 1072, 16, 14, 16495, 1463, 60, 800, 3726, 3726, 31, 114, 117, 51, 64, 636, 14113, 9097, 500, 2558, 165, 500, 15, 17, 31, 3551, 30, 14, 2065, 799, 20, 361, 5455,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get all data from the object into one two-dimentional array === I need to dump all data from the object into two-dimetional array this is the declaration: GetItemCall oGetItemCall = new GetItemCall(oContext); then, I can use `oGetItemCall.Item.ConditionID` or `oGetItemCall.Item.ListingDetails.EndTime` etc. But the `oGetItemCall` object has lots of variables and I want to add them into one easy to read 2-dimensional array. Is there any way of doing this ?
0
[ 2, 164, 65, 1054, 37, 14, 3095, 77, 53, 81, 8, 1115, 1130, 872, 192, 7718, 800, 3726, 3726, 31, 376, 20, 11424, 65, 1054, 37, 14, 3095, 77, 81, 8, 1115, 790, 3309, 192, 7718, 48, 25, 14, 7098, 45, 164, 2119, 79, 9200, 635, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the relationship between Vala VAPI and GObject Introspection? === First, some context: I'm a Python developer who has written a medium-sized application using PyGObject, taking advantage of GObject Introspection to access things like GSettings, etc. Some of my Python objects actually subclass GObject.GObject, so I'm using GObject quite extensively. Recently, a certain library has come to my attention that wraps a C library in GObject (gexiv2, used by Shotwell/Vala), however it doesn't currently support introspection. I'm interested in adding introspection support to gexiv2 so that I can access it from Python, but I don't even know where to begin on this topic. When I research introspection and VAPI, I see lots of documentation referencing the fact that the VAPI can be automatically generated from the introspection annotations... but what about a project that already has a VAPI, but no introspection? Is it possible to automatically generate the introspection annotations given the VAPI? Thanks.
0
[ 2, 98, 25, 14, 1429, 128, 13, 19150, 3471, 2159, 17, 489, 23793, 17386, 7350, 872, 60, 800, 3726, 3726, 64, 15, 109, 4141, 45, 31, 22, 79, 21, 20059, 10058, 72, 63, 642, 21, 4152, 8, 6560, 3010, 568, 13, 28860, 23793, 15, 741, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
making default value the previously selected value (JSTL) === I have a drop down menu that is full of biller names as such: <select id="mailer_filter"> <optgroup label="VIEW BY SUBSCRIPTION"> <c:forEach var="Mailer" items="${mailerlist.billerNameList}"> <option value="searchFor=${Mailer.billerName}&searchBy=3&addressTypeF=${requestScope.addressTypeF}&folder=${mailitems.mailboxAttributes.folder}"><c:out value="${Mailer.billerName}"/></option> </c:forEach> </optgroup> </select> <script type="text/javascript"> $('#mailer_filter').change(function(){ epost.fn.windowLocation('mailList.a?' + $(this).val()); }); </script> what I would like to attempt to do is which ever item the user selected from the drop down. to have that item show up as the default selected value in the drop down when the page reloads with the data again. i'm assuming there are many ways to do this, what is involved here is storing the selected item in the request scope or something I guess. the variable = ${Mailer.billerName} is the name i wish to make default on reload when the user has selected that from the drop down. thanks for your time, knowledge and effort.
0
[ 2, 544, 12838, 1923, 14, 1343, 1704, 1923, 13, 5, 728, 18, 7786, 6, 800, 3726, 3726, 31, 57, 21, 2804, 125, 11379, 30, 25, 503, 16, 1071, 106, 1817, 28, 145, 45, 13, 1, 18, 16964, 4924, 3726, 7, 8079, 106, 1, 11924, 815, 7, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JavaScript move delay and multiple keystrokes === Here is my problem: http://testepi.kvalitne.cz/test/ I do not want thay delay between keypress and real move of that square. And I would also like to know, how to move diagonally(pressing two keys at same time). Thanks for your help. My code: $(function(){ document.addEventListener("keydown", move, false); var x = 0; var y = 0; function move(event){ if(event.keyCode==37){ x -= 10; $("#square").css("left", x); } if(event.keyCode==39){ x += 10; $("#square").css("left", x); } if(event.keyCode==38){ y -= 10; $("#square").css("top", y); } if(event.keyCode==40){ y += 10; $("#square").css("top", y); } } });
0
[ 2, 8247, 8741, 780, 7255, 17, 1886, 1246, 12962, 18, 800, 3726, 3726, 235, 25, 51, 1448, 45, 7775, 6903, 591, 8375, 49, 9, 197, 18506, 38, 556, 9, 8378, 118, 10543, 118, 31, 107, 52, 259, 10565, 93, 7255, 128, 1246, 5890, 17, 68...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Creating a type class using type class in python === I was reading this interesting article on metaclasses http://stackoverflow.com/questions/100003/what-is-a-metaclass-in-python. The accepted answer shows how to create a class using type with the following signature. > type(name of the class, > tuple of the parent class (for inheritance, can be empty), > dictionary containing attributes names and values) I tried to create 'type' class using the above signature and I was surprised that I was allowed to create one in the first place! Your views are appreciated! `type = type('type',(),{});` Second, after I created a type class using the above syntax, I was not able to do myclass = type('myclass',(),{}); and `type = type('type',(),{});` I got an error saying > Traceback (most recent call last): File "<stdin>", line 1, in > <module> TypeError: object.__new__() takes no parameters But, when I tried to the following, I could succeed. class myclass(object): pass I am puzzled coz, according to my understanding the above snippet should invoke type in an attempt to create the class 'myclass'. So whats going on!? Am I missing some detail?
0
[ 2, 2936, 21, 1001, 718, 568, 1001, 718, 19, 20059, 800, 3726, 3726, 31, 23, 1876, 48, 4883, 2002, 27, 7618, 1898, 160, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 24803, 2032, 9280, 608, 8, 403, 8, 58, 8, 5909, 58, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to load <img> tag SRC into a javascript variable to be re-used across multiple images? === So here is my plan for fast web page downloading... 1. Place all images into a single png-24 image sprite. 2. Encode that image as base64 and include it in the webpage HTML code. 3. Duplicate the SRC of the original image sprite and re-use it for the logo, share buttons, other images, etc.. The only problem I can foresee is the duplication of the base64 encoded image source. Can I readily extract the image source with jQuery and just re-insert it into all of my blank images (the images that need the sprite to be created)?
0
[ 2, 184, 20, 6305, 13, 1, 1660, 263, 1, 3383, 13, 18, 5453, 77, 21, 8247, 8741, 7612, 20, 44, 302, 8, 8795, 464, 1886, 3502, 60, 800, 3726, 3726, 86, 235, 25, 51, 944, 26, 1512, 2741, 2478, 7121, 68, 9, 9, 9, 137, 9, 209, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
resultsetmetadata.getScale() returns 0 when using aggregate functions like min or max === In an java application I select numeric values from an oracle database. I need to know the number of digits right to the comma of the selected values, so I used the getScale() Method of the ResultSetMetaData Class. This approach works fine as long as I do not use aggregate functions like min, max... in my select statement. When using min or max getScale() returns 0. ColumnType is still the same (NUMERIC) as the column value is. Any ideas what the reason might be? Also I'm still looking for a workaround that is not too awkward. We use: oci driver, Java 6, Oracle 10g
0
[ 2, 1736, 1198, 5909, 58, 18768, 9, 3060, 5093, 5, 6, 4815, 713, 76, 568, 8544, 3719, 101, 4232, 54, 2049, 800, 3726, 3726, 19, 40, 8247, 3010, 31, 5407, 15764, 596, 4070, 37, 40, 15759, 6018, 9, 31, 376, 20, 143, 14, 234, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unable to construct and use DB class === Hey guys I'm doing this wrong I'm sure, but I'm trying to instantiate a PDO database handler from my class Database from the file class.database.php inside my class AdminSession from class.admin.php, somethings a bit screwy with my dependancy injection. Maybe someone could help me out? the class.database.php file class Database { /** * Connect to database * @access public * @return bool HANDLER on success EXCEPTION otherwise **/ public function getConnection() { // Handle different environments switch($_SERVER['ENVIRONMENT']) { case 'staging': $dbhost="domain.com"; $dbuser="user"; $dbpass="pass"; $dbname="db"; break; default: $dbhost="domain.com"; $dbuser="user"; $dbpass="pass"; $dbname="db"; } // Connect $options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'); $dbh=new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass, $options); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $dbh; } } and here's the topmost of my class.admin.php require('library/class.database.php'); class AdminSession { static $abs_path; private $db; public function __construct(Database $db) { session_start(); $this->db = $db; self::$abs_path = dirname(dirname(__FILE__)); if($_SERVER['REQUEST_METHOD'] == 'POST') { $this->post = $_POST; // filter_var_array(INPUT_POST, FILTER_SANITIZE_STRING); if(get_magic_quotes_gpc ()) { //get rid of magic quotes and slashes if present array_walk_recursive($this->post, array($this, 'stripslash_gpc')); } } $this->get = $_GET; // filter_var_array(INPUT_GET, FILTER_SANITIZE_STRING); array_walk_recursive($this->get, array($this, 'urldecode')); } // rest of the class }
0
[ 2, 2343, 20, 6960, 17, 275, 13, 9007, 718, 800, 3726, 3726, 8409, 2776, 31, 22, 79, 845, 48, 1389, 31, 22, 79, 562, 15, 47, 31, 22, 79, 749, 20, 6322, 15882, 21, 351, 537, 6018, 24641, 37, 51, 718, 6018, 37, 14, 3893, 718, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does this ERD make sense? === I'm trying to replicate an email service provider where emails can be stored and also sent out based on subscribers. I'm focusing on the data structure atm but I can't help but to think I may have done something wrong. As you can see in the diagram, towards the Subscriber, List and Subscriber List relationship. I'm trying to achieve the scenario of.. A subscriber can be part of many lists, but a list can hold many subscribers. Does this diagram make sense on this matter? Thanks ![enter image description here][1] [1]: http://i.stack.imgur.com/YiJ0T.jpg
0
[ 2, 630, 48, 13, 106, 43, 233, 1259, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 22156, 40, 8517, 365, 11747, 113, 8517, 18, 92, 44, 8214, 17, 67, 795, 70, 432, 27, 19549, 9, 31, 22, 79, 7796, 27, 14, 1054, 1411, 35, 79, 47, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Drop down menu flickering except in firefox === I'm having a problem similar to this one http://stackoverflow.com/questions/1430183/drop-down-box-keeps-flickering-jquery-and-css with a drop down menu flickering when I move the mouse over it, except that it doesn't seem to happen in firefox. Here is the html code behind it. <!--// HEADER //--> <div id="header"> <!--// CONTENT //--> <div id="navigation"> <!--// COMPLETESET //--> <div id="completeset"><h1><a href="/index" title="CompleteSet">CompleteSet</a></h1></div> <!--// AUTHENTICATED //--> <div id="options" class="authenticated"> <ul> <li><a href="/index" class="organizer" title="Organizer">Z</a></li> <li><a href="#" class="scoreboard" title="Scoreboard">6</a></li> <li><a href="/user/fMcBBx" class="profile" title="Profile">Jaime Rump</a></li> <li><a href="javascript: toggleAccount()" class="account" title="Account">/</a></li> </ul> </div> <!--// ACCOUNT //--> <div id="account_container" style="display: none;" onmouseout="toggleAccount();"> <div id="account"> <ul> <li><span class="title">Learn More</span></li> <li><a href="/about" class="About CompleteSet" title="About CompleteSet">About CompleteSet</a></li> <li><a href="" class="Help" title="Help">Help</a></li> <li><span class="title">Account Options</span></li> <li><a href="javascript: showUserInvite(1000000)" class="Invite Friends" title="Invite Friends">Invite Friends</a></li> <li><a href="" class="Send Feedback" title="Send Feedback">Send Feedback</a></li> <li><a href="/settings/fMcBBx" class="Settings" title="Settings">Settings</a></li> <li><a href="/login/logout" class="Log Out" title="Log Out">Log Out</a></li> </ul> </div> </div> </div> </div> As you can see, the "account_container" div is the drop down menu. It first appears when the user clicks on the account li and disappears either when the user clicks on the li again or mouses out. Here is the toggle function: function toggleAccount(){ $("#account_container").toggle(); } Nothing special. I figured it might be a problem with the width of the container, since that was the problem in the linked question. I checked the CSS and found this. height: auto; position: absolute; width: auto; The width and height shouldn't be causing the flickering because they aren't fixed. Could the position be doing it? If not, what else might cause this to happen in chrome and IE but not firefox?
0
[ 2, 2804, 125, 11379, 22399, 1613, 19, 535, 18219, 800, 3726, 3726, 31, 22, 79, 452, 21, 1448, 835, 20, 48, 53, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 11698, 19268, 12081, 118, 12361, 8, 2968, 8, 5309, 8, 12211, 18,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ADO Entity Data Model Designer is not available in VS 2012 RC with EF 5? === I upgrade VS 2010 to 2012 RC with EF 5 RC, but ADO Entity Data Model Designer is not available anymore. How to update edmx from database with edmx in this case?
0
[ 2, 21, 537, 9252, 1054, 1061, 4742, 25, 52, 904, 19, 4611, 563, 16462, 29, 11599, 331, 60, 800, 3726, 3726, 31, 9483, 4611, 498, 20, 563, 16462, 29, 11599, 331, 16462, 15, 47, 21, 537, 9252, 1054, 1061, 4742, 25, 52, 904, 3375, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tools to extract all functions from a source code project === I'm trying to build a list of available tools for parsing a complete source code package and extracting all of the functions/methods as separate pieces. My goal is to run a tool or script, immediately know how many functions are in the package, and to easily examine the complete set of segmented functions one-by-one as needed. Right now I'm using the NiCad clone detection tool, which includes an extract script written in TXL (a tree transformation language). Each function is pulled out and stored as a unique entity in an XML document, so handling the list of functions is very convenient. NiCad included extract tools for C, Java, and Python. I'm mostly concerned with C, but it's also nice to have the rest available. We don't have a C++ parser set up yet - that would be handy. I've also used Doxygen, which has the added bonus of identifying the call graph. There's a lot of markup in these files though, so it's a bit of extra work to parse Doxygen's output to get them into a plain list of functions. Has anyone used a tool that extracts the full set of functions/methods? Do you have recommendations or warnings? If you've written your own, is it available somewhere? Thanks!
0
[ 2, 4672, 20, 10962, 65, 3719, 37, 21, 1267, 1797, 669, 800, 3726, 3726, 31, 22, 79, 749, 20, 1895, 21, 968, 16, 904, 4672, 26, 2017, 18, 68, 21, 1279, 1267, 1797, 6030, 17, 10962, 68, 65, 16, 14, 3719, 118, 5909, 1807, 43, 18,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
FLash Media Server Application === Ok, here it goes...I am using a Flash Media Server hosting company. I have created an application named it mytestone. I want to create a live chat between two people. I have edited the main asc file. I think i typed everything in correctly. I wonder if my rtmp url address is correct or not? Because when i finished editing i went to my fms admin console clicked on the rtmp connection and nothing happened. I guess what i am really asking is how to create an application I am rather new to all this so any advice or guidance would most be appreciated thanks. This is from my main asc below: var nc.connect("NetConnection = new NetConnection(); nc.connect("rtmp://fmsserver.rtmphost.com/mytestone"); //setup the camera and mic for streaming mycam = Camera.get(); mycam_audio = Microphone.get(); //control the cameras mode and quality mycam.setMode(320,240,30); mycam.setQuality(10000,100); //attach a vlive preview of the camera to the //video object that is setup on the stage cam_feed.attachVideo(mycam); cam_feed.attachAudio(mycam_audio); //connect to the Flash Media Server client_nc = new NetConnection(); client_nc.connect("rtmp://fmsserver.rtmphost.com/mytestone"); cam_ns = new NetStream(client_nc); //attach our camera video and audio to the net stream cam_ns.attachVideo(mycam); cam_ns.attachAudio(mycam_audio); //publish to our Flash Media Server as a `enter code here`//live stream called user_1 cam_ns.publish("user_1", "live"); //bring in user_2's video/audio in_ns = new NetStream(client_nc); in_ns.play("user_2"); //attach user_1's published audio and video //so we can see them in the larger chat window live_feed.attachVideo(in_ns); live_feed.attachAudio(in_ns); //setup the camera and mic for streaming mycam = Camera.get(); mycam_audio = Microphone.get(); //control the cameras mode and quality mycam.setMode(320,240,30); mycam.setQuality(10000,100); //attach a live preview of the camera to the //video object that is setup on the stage cam_feed.attachVideo(mycam); cam_feed.attachAudio(mycam_audio); //connect to the Flash Media Server client_nc = new NetConnection(); client_nc.connect("rtmp://fmsserver.rtmphost.com/mytestone"); cam_ns = new NetStream(client_nc); //attach our camera video and audio to the net stream cam_ns.attachVideo(mycam); cam_ns.attachAudio(mycam_audio); //publish to our Flash Media Server as a //live stream called user_2 cam_ns.publish("user_2", "live"); //bring in user_1's video/audio in_ns = new NetStream(client_nc); in_ns.play("user_1's); //attach user_1's published audio and video //so we can see them in the larger chat window live_feed.attachVideo(in_ns); enter code herelive_feed.attachAudio(in_ns);
0
[ 2, 4433, 941, 8128, 3010, 800, 3726, 3726, 5854, 15, 235, 32, 1852, 9, 9, 9, 49, 589, 568, 21, 4433, 941, 8128, 10637, 237, 9, 31, 57, 679, 40, 3010, 377, 32, 51, 591, 2426, 9, 31, 259, 20, 1600, 21, 515, 6615, 128, 81, 148,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASP Classic & SQL date out-of-range error === I am moving an ASP classic app to a new server. I did not developed the app and I have no experience with ASP, hope someone can guide me. One of the pages in the app drop this error: Microsoft OLE DB Provider for ODBC Drivers error '80040e07' [Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. /clientname/Admin/EntregasProcess.asp, line 49 I read that maybe could be the date format so I change it to yyyy-mm-dd. Now it is showing this: Microsoft OLE DB Provider for ODBC Drivers error '80040e07' [Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. /clientname/Admin/EntregasProcess.asp, line 62 The date format on the database is writen like this: 2006-07-31 00:00:00.000 and this is the code of the asp file: <%@ Language=VBScript %> <!--#include file="StrConn.asp"--> <% if Session("Role") <> "AD" Then 'AD=Administrador, CG = Consulta Gral. Response.Redirect "../home.asp" end if %> <% Dim month_number, year_number, day_number, tituloEntrega, Estatus, idCuestionario, date_number month_number = Request.Form("month_number") year_number = Request.Form("year_number") day_number = Request.Form("day_number") tituloEntrega = trim(Request.Form("tituloEntrega")) idCuestionario = Request.Form("idCuestionario") Estatus = Request.Form("Estatus") idEntrega = Request.Form("idEntrega") <!--BITACORA::ESC::Oscar Salgado 20090729--> bitacora = Request.Form("bitacora") page = Request.Form("page") <!--=====================================--> date_number = dateSerial(year_number,month_number+1,day_number) Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open strConnPortal <!--BITACORA::ESC::Oscar Salgado 20090729--> SQL="Delete from dbo.tbBitacoraShow where idCuestionario = " & idCuestionario conn.execute(SQL) if bitacora = "1" Then SQL="Insert into dbo.tbBitacoraShow(idCuestionario) values(" & idCuestionario & ")" end if conn.execute(SQL) <!--=====================================--> Select Case Request.Form("btnGo") Case "Agregar" if trim(tituloentrega) <> "" Then SQL = "Insert into tbEntregas(TituloEntrega,Date,Estatus,IDCuestionario) values('" & _ tituloEntrega & "','" & date_number & _ "'," & estatus & ",'" & idCuestionario & "')" conn.Execute sql end if 'Response.Write SQL 'Response.End Case "Actualizar" SQL = "update tbEntregas Set TituloEntrega = '" & tituloEntrega & _ "',Date='" & date_number & " ',Estatus=" & estatus & _ ",IdCuestionario='" & idCuestionario & "' Where idEntrega = " & idEntrega conn.Execute sql 'Response.Write SQL 'Response.End End Select Response.Redirect "Entregas.asp?idEntrega="&idEntrega&"&page="&page %>
0
[ 2, 28, 306, 2732, 279, 4444, 255, 1231, 70, 8, 1041, 8, 8366, 7019, 800, 3726, 3726, 31, 589, 1219, 40, 28, 306, 2732, 4865, 20, 21, 78, 8128, 9, 31, 144, 52, 885, 14, 4865, 17, 31, 57, 90, 1496, 29, 28, 306, 15, 1376, 737, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Selecting jquery elements with brackets [] === Why doesn't this work $('div.note')[0].removeClass('hidden'); I get this error from firebug: TypeError: note.removeClass is not a function
0
[ 2, 20764, 487, 8190, 93, 2065, 29, 21971, 20767, 800, 3726, 3726, 483, 1437, 22, 38, 48, 170, 5579, 5, 22, 12916, 9, 10280, 22, 6, 2558, 387, 500, 9, 99, 16598, 1898, 5, 22, 1822, 43, 817, 22, 6, 73, 31, 164, 48, 7019, 37, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
Is it possible to write a protocol in Google App Engine? === I want to write a protocol called [DSNP][1] with Google App Engine so that it will be available on the internets, because I cannot make it run in a shared hosting. Is it possible to write the protocol with Java and then make it run in Google Apps Engine? [1]: https://github.com/ilhanyumer/DSNP
0
[ 2, 25, 32, 938, 20, 2757, 21, 8494, 19, 8144, 4865, 1406, 60, 800, 3726, 3726, 31, 259, 20, 2757, 21, 8494, 227, 636, 43, 18, 8157, 500, 2558, 165, 500, 29, 8144, 4865, 1406, 86, 30, 32, 129, 44, 904, 27, 14, 2620, 18, 15, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
If threads are getting 3000 posts each is it maybe better to make a new table per thread? === There's 12 million posts already and people seem to be using things as a chat. I don't know if it's more efficient to have a bunch of little tables than having the database scan for the last 10 messages in a database with so many entries. I know I'd have to benchmark but just asking if anyone has any observations or anecdotes if they've ever had similar situations.
0
[ 2, 100, 20396, 50, 1017, 13226, 9868, 206, 25, 32, 913, 574, 20, 233, 21, 78, 859, 416, 9322, 60, 800, 3726, 3726, 80, 22, 18, 390, 507, 9868, 614, 17, 148, 2260, 20, 44, 568, 564, 28, 21, 6615, 9, 31, 221, 22, 38, 143, 100,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I pre-populate a hidden form field in grails? === I have just gotten started with Grails and I have a very basic application running. I want to pre-populate a hidden form field with a random string. What is the best way to do this? I have looked at the taglib but I am not sure what the best practice is for this sort of thing. Should I create a class in the src/java or src/groovy folder or is there a better way to get this done? Lastly, and I know this is a very basic question, but if I do create a class or taglib, how exactly is that called from within the .gsp page? Thanks!
0
[ 2, 184, 92, 31, 782, 8, 6057, 12383, 21, 3689, 505, 575, 19, 489, 7301, 18, 60, 800, 3726, 3726, 31, 57, 114, 4094, 373, 29, 489, 7301, 18, 17, 31, 57, 21, 253, 2125, 3010, 946, 9, 31, 259, 20, 782, 8, 6057, 12383, 21, 3689,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android Voice Search Does Not Cancel Search Dialog === I'm trying to get search implemented for the first time in one of my Android applications. The approach I took was to pop up a search dialog when a button is pressed from my Main Activity. When I do a search via keyboard (NOT voice search), my search activity is started, the results are shown and when I choose a result, I send back the "chosen" item and set a flag stating that a search was performed. Then, when the search activity is finished, the main activity comes back up and onRestart() is called. In onRestart(), I look for the aforementioned flag and do some work to show the desired information. This is all working perfectly for keyboard-input searches. Now, when I try to do a voice search instead of a keyboard search, everything works the same up until after I choose a ListView item in the search activity. Instead of onRestart() being called, it just goes back to the main activity with the search dialog still showing... Since onRestart() is never called via voice search, my main activity isn't showing the information I expect it to show. Is this an Android bug where the search dialog is supposed to be dismissed and onRestart() is supposed to be called when I return from the search activity or is there some way around this? If it's a bug, I'll just disable the voice search, but I would prefer to provide voice search for my users. I appreciate any help you can provide. Thanks!!!
0
[ 2, 13005, 430, 2122, 630, 52, 14815, 2122, 28223, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 2122, 6807, 26, 14, 64, 85, 19, 53, 16, 51, 13005, 3767, 9, 14, 2141, 31, 199, 23, 20, 1675, 71, 21, 2122, 28223, 76, 21, 5167, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
linux cpu affinity for all system process === Is there a way to set all system process' other than my own process' threads to their own cpu without manually setting each pid. I am using c on fedora and would like to set this on program start not before.
0
[ 2, 13024, 17578, 19211, 26, 65, 329, 953, 800, 3726, 3726, 25, 80, 21, 161, 20, 309, 65, 329, 953, 22, 89, 119, 51, 258, 953, 22, 20396, 20, 66, 258, 17578, 366, 23671, 2697, 206, 13, 11031, 9, 31, 589, 568, 272, 27, 26726, 58...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
Creating custom site on iis 7 === I have iis 7 running on my win 7. Every thing works fine with the Default Web site. Now I am trying to create a new site with physical path `C:\users\xxx\mysite`. I am following [this][1] tutorial. [1]: http://technet.microsoft.com/en-us/library/cc772350%28v=ws.10%29.aspx The site is created but when i run it,I get the following error: **HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.** How do I fix the problem?
0
[ 2, 2936, 5816, 689, 27, 595, 18, 453, 800, 3726, 3726, 31, 57, 595, 18, 453, 946, 27, 51, 628, 453, 9, 352, 584, 693, 1123, 29, 14, 12838, 2741, 689, 9, 130, 31, 589, 749, 20, 1600, 21, 78, 689, 29, 1825, 2013, 13, 1, 150, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
EXC_BAD_ACCESS error with RestKit in didReceiveResponse method === I can't get rid of a EXC_BAD_ACCESS error in RestKit. I suspect its because I have an ARC project and may be releasing the request or response variable too many times, but I've spent hours on this and am not sure. My problem sounds similar to [this post][1], but I'm not sure where in my code to make a similar change. My implementation file has a straightforward method to post the new object to the server. All the mapping logic is down within the implementation file for the NSObject below: -(void) createMeeting { NSString* baseUrl = @"https://myapp.appspot.com/api/meeting/?format=json&username=testuser@test.com&api_key=f8s9df8as8df9s8d97"; RKObjectManager* rkoManager = [RKObjectManager objectManagerWithBaseURLString:baseUrl]; [NewMeetingRK initMap:rkoManager]; NewMeetingRK *newmtg = [NewMeetingRK alloc]; newmtg.leader = self.leaderEmail.text; newmtg.startdate = [sqliteformatter stringFromDate:bdate]; newmtg.enddate = [sqliteformatter stringFromDate:edate]; [[RKObjectManager sharedManager] postObject:newmtg delegate:self]; And it successfully begins requestDidStartLoad:(RKRequest *)request However it then crashes in RKResponse.m on the second to last line below (if ([[_request delegate] respondsToSelector:... with a EXC_BAD_ACCESS error. - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSHTTPURLResponse *)response { RKResponseIgnoreDelegateIfCancelled(); RKLogDebug(@"NSHTTPURLResponse Status Code: %ld", (long) [response statusCode]); RKLogDebug(@"Headers: %@", [response allHeaderFields]); _httpURLResponse = [response retain]; [_request invalidateTimeoutTimer]; if ([[_request delegate] respondsToSelector:@selector(request:didReceiveResponse:)]) { [[_request delegate] request:_request didReceiveResponse:self]; } } [1]: http://stackoverflow.com/questions/2802180/asynchronous-nsurlconnection-throws-exc-bad-access Any ideas to help me? Thanks much.
0
[ 2, 1396, 150, 1, 5989, 1, 20604, 7019, 29, 760, 13703, 19, 144, 99, 1105, 19737, 160, 8782, 870, 2109, 800, 3726, 3726, 31, 92, 22, 38, 164, 6681, 16, 21, 1396, 150, 1, 5989, 1, 20604, 7019, 19, 760, 13703, 9, 31, 7551, 82, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting link from Mechanize/Nokogiri === I am trying to discover the best way to retrieve the a href link from a Nokogiri Node. Here is where I am at mech = Mechanize.new mech.get(HOME_URL) mech.page.search('.listing_content').each do |business| website = business.css('.website-feature') puts website.class puts website.inner_html end output => Nokogiri::XML::NodeSet <a href="http://urlofsite.com" class="track-visit-website no-tracks" onclick='omniture.callClick({"eVar6":6,"eVar9":1,"eVar21":"search_results","eVar50":null,"prop17":"cars","prop26":"64c15af0-a558-012f-a041-00215a4685f6","eVar42":"64c15af0-a558-012f-a041-00215a4685f6","prop27":6,"prop38":"search_results","prop39":1,"prop46":null,"events":"event6,event7","eVar51":optimostIDs.trialID.toString(),"eVar52":optimostIDs.segmentID.toString(),"eVar53":optimostIDs.creativeID.toString(),"eVar54":optimostIDs.subjectID.toString(),"prop47":null,"prop51":optimostIDs.trialID.toString(),"prop52":optimostIDs.segmentID.toString(),"prop53":optimostIDs.creativeID.toString(),"prop54":optimostIDs.subjectID.toString(),"prop56":"Saint+George%2C+UT","prop57":null,"prop58":false,"prop59":null,"eVar60":"relevancyTest2","prop60":"relevancyTest2","prop61":false,"prop62":null,"prop64":null,"prop67":null,"prop68":null,"prop70":null,"prop71":null});; atti_logs.attiClick({"iid":"651691e0-a558-012f-2ca7-18a9053c171a","lt":6,"ptid":"www.yellowpages.com","rid":"vendetta-236e7298-3a4f-4744-8ff5-4eb5fcc8e188","ypid":3848879,"lid":3848879,"vrid":"64c15af0-a558-012f-a041-00215a4685f6","nav":null});' rel="nofollow" target="_blank" title="Executive Service Ctr Website"><span class="raquo">»</span> Website</a> Basically, I just need to get the http://urlofsite.com out of the inner_html, and i'm not sure how to do that. I've read about doing it with css and xpath but I can't get either to work at this point. Thanks for any help
0
[ 2, 1017, 3508, 37, 55, 3606, 2952, 118, 251, 921, 14913, 800, 3726, 3726, 31, 589, 749, 20, 6297, 14, 246, 161, 20, 11917, 14, 21, 746, 14057, 3508, 37, 21, 90, 921, 14913, 15421, 9, 235, 25, 113, 31, 589, 35, 55, 673, 800, 55...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
split apply recombine, plyr, data.table in R === I am doing the classic split-apply-recombine thing in R. My data set is a bunch of firms over time. The applying I am doing is running a regression for each firm and returning the residuals, therefore, I am not aggregating by firm. `plyr` is great for this but it takes a very very long time to run when the number of firms is large. Is there a way to do this with `data.table`? Sample Data: dte, id, val1, val2 2001-10-02, 1, 10, 25 2001-10-03, 1, 11, 24 2001-10-04, 1, 12, 23 2001-10-02, 2, 13, 22 2001-10-03, 2, 14, 21 I need to split by each id (namely 1 and 2). Run a regression, return the residuals and append it as a column to my data. Is there a way to do this using `data.table`?
0
[ 2, 2132, 5645, 302, 10204, 1149, 15, 351, 102, 139, 15, 1054, 9, 5924, 19, 761, 800, 3726, 3726, 31, 589, 845, 14, 2732, 2132, 8, 7753, 102, 8, 99, 10204, 1149, 584, 19, 761, 9, 51, 1054, 309, 25, 21, 7653, 16, 10656, 84, 85, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS: how to place a control at the center of the parent container? === I have a control and a container, the container's width is specified firstly. After that I add the control to the container. How to tell the container to place the child control at the center horizontally? I want to specify the y value by myself.
0
[ 2, 13, 7760, 45, 184, 20, 209, 21, 569, 35, 14, 459, 16, 14, 4766, 12147, 60, 800, 3726, 3726, 31, 57, 21, 569, 17, 21, 12147, 15, 14, 12147, 22, 18, 9456, 25, 9931, 64, 102, 9, 75, 30, 31, 3547, 14, 569, 20, 14, 12147, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Fork() command issue === While going thorough fork() command i got struck with a question . how many no.of processes are created by the end of 12th second, if time starts from 0th second? Process id's start from 0. **Pseudo code** while(true) { sleep 1second; if( getpid() % 2 == 0 ) { fork(); printf("Hello\n"); } } when i run above code on my system it is not showing output on konsole. Is no . of process at end of 12 sec is dependent on OS ?Need suggestion as i am not good in fork()
0
[ 2, 8777, 5, 6, 1202, 1513, 800, 3726, 3726, 133, 228, 17509, 8777, 5, 6, 1202, 31, 330, 3395, 29, 21, 1301, 13, 9, 184, 151, 90, 9, 1041, 5102, 50, 679, 34, 14, 241, 16, 390, 96, 153, 15, 100, 85, 3244, 37, 713, 96, 153, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...