unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Doing X when model is saved === What's the correct way to do X when Django's model is saved? Let me try to explain it. :) For example, I have model that is responsible for blog's articles. I want to use title field to generate slug field if it's not set already. It should happen just before model is saved. This is how I have achieved it at the moment. def save(self, *args, **kwargs): if self.slug == '': self.slug = slugify(self.title) super(Article, self).save(*args, **kwargs) Are there any other way to do it? Are other ways better than this, how? Thanks in any advice!
0
[ 2, 845, 993, 76, 1061, 25, 4377, 800, 3726, 3726, 98, 22, 18, 14, 4456, 161, 20, 107, 993, 76, 3857, 14541, 22, 18, 1061, 25, 4377, 60, 408, 55, 1131, 20, 3271, 32, 9, 13, 45, 6, 26, 823, 15, 31, 57, 1061, 30, 25, 1864, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Sending information to API using Android === I am trying to contact an API and get the response. As part of my debugging I want to insure that the response is being recorded, it should be an xml response. Here's what I have: public class http extends Activity { public void httpMethod(){ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://api.ipviking.com/api/"); try { // Add your data List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2); nameValuePairs.add(new BasicNameValuePair("apikey", "6899ec1a65a9565b32f7b6d5848ed45914f590d4e122df6da602a573fbeb4a84")); nameValuePairs.add(new BasicNameValuePair("method", "ipq")); nameValuePairs.add(new BasicNameValuePair("ip", "65.82.126.103")); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); // Execute HTTP Post Request HttpResponse response = httpclient.execute(httppost); } catch (ClientProtocolException e) { // TODO Auto-generated catch block } catch (IOException e) { // TODO Auto-generated catch block } TextView myTextView = (TextView) findViewById(R.id.myTextView); myTextView.setText(response); } } I'm trying to see the response that I get, however the variable response in the line myTextView.setText(response) is throwing an error: response cannot be resolved to a variable is response not truly a variable of the type httpresponse? what's going on here...?
0
[ 2, 4907, 676, 20, 21, 2159, 568, 13005, 800, 3726, 3726, 31, 589, 749, 20, 2203, 40, 21, 2159, 17, 164, 14, 1627, 9, 28, 141, 16, 51, 121, 16254, 2762, 31, 259, 20, 19, 5838, 30, 14, 1627, 25, 142, 801, 15, 32, 378, 44, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Doctrine2 : Applying a filter to an association === For example if I have : class Parent { /* ... */ /** One to Many association */ protected $children; } class Child { /* .. */ /** many to one association */ protected $parent; /* name of child column */ protected $name; } Now, let's say for a parent, I want to filter the children by their name. If possible, somehow doing parent.getChildren() with this filter would be nice but that's impossible. I'd like it to probably have the syntax getChildrenByName(), but this function seems unfitting for the ORM class and it's repository class. Does anyone have any suggestions?
0
[ 2, 7521, 135, 13, 45, 11989, 21, 11945, 20, 40, 607, 800, 3726, 3726, 26, 823, 100, 31, 57, 13, 45, 718, 4766, 13, 1, 13, 118, 2483, 13, 9, 9, 9, 1637, 118, 13, 118, 1409, 53, 20, 151, 607, 1637, 118, 3803, 5579, 17853, 73, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 creat list to select index? === I have this code to check indexes in a file to see if they match, but to start off I am having trouble being able to select an index, what do I have to do in order to be able to do so, because at this moment it doesnt show the values as being in a list. def checkOS(): fid = open("C:/Python/NSRLOS.txt", 'r') fhand = open("C:/Python/sha_sub_hashes.out", 'r') sLine = fhand.readline() line = fid.readline() outdata = [] print line checkOS() right now it prints: "190","Windows 2000","2000","609" I only want it to print:(so index[0]) 190 and when I try index[0] I just get ' " ' so the first value in the whole string, I want a list to be able to select the index.
0
[ 2, 184, 20, 5059, 721, 968, 20, 5407, 4348, 60, 800, 3726, 3726, 31, 57, 48, 1797, 20, 2631, 4348, 160, 19, 21, 3893, 20, 196, 100, 59, 730, 15, 47, 20, 799, 168, 31, 589, 452, 2572, 142, 777, 20, 5407, 40, 4348, 15, 98, 107...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Java Dynamic Proxy with Jetty embedded inside GWT === I've a Hibernate code running inside a Java Dynamic Proxy (see http://stackoverflow.com/questions/2587702), I wanted to write some front-end to this code. I decided to use GWT, but I am faced with strange behavior, the following is GWT Service code: public List<BuName> listBuNames() { List<BuName> ret = null; try { List<BuName> buNameList = BuServiceRef.listBuNames(null, null); ret = new ArrayList<BuName>(); for (BuName buName : buNameList) { System.out.println("G SRV" + buName.getId() + " : " + buName.getBuName()); ret.add(new BuName(buName.getId(), buName.getBuName())); } } catch (Exception e) { e.printStackTrace(); } return ret; } The code above prints the Object Id `buName.getId()` but prints blank String for Object name `buName.getBuName()`. *I think the the problem is in Jetty, cause the problem arise in the GWT server side in Dev mode, But when compile and deploy the GWT app inside `tomcat 6.x`, this issue doesn't appear!*
0
[ 2, 8247, 7782, 27188, 29, 17341, 93, 12138, 572, 14094, 38, 800, 3726, 3726, 31, 22, 195, 21, 4148, 2102, 8820, 1797, 946, 572, 21, 8247, 7782, 27188, 13, 5, 1798, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 23264, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
HTTP Error 400 - Bad Request after button click in vb.net === I have a web form(.net framework 4) at following url `http://localhost:19260/Dpp2012New/NewTrans.aspx`. This form contains a submit button.When I debug the website from visual studio 2010, the form appears as intended.But when I click on its submit button, I get the following error: Server Error in '/Dpp2012New' Application. HTTP Error 400 - Bad Request. Version Information: ASP.NET Development Server 10.0.0.0 I scratched through the net to find a solution and the outcome of which suggests that the problem arises when there are invalid characters in the URL.But then why does the form loads in the first place? Any help to solve the problem would be highly appreciated.
0
[ 2, 7775, 7019, 4353, 13, 8, 896, 3772, 75, 5167, 10840, 19, 13, 20468, 9, 2328, 800, 3726, 3726, 31, 57, 21, 2741, 505, 5, 9, 2328, 6596, 268, 6, 35, 249, 287, 6362, 13, 1, 21127, 6903, 15580, 11694, 45, 13363, 15928, 43, 3421, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Limit array elements based on next key or previous key? === I have an array of thumbnails similar to: $thumbnails = array(1,2,3,4,5,6,7,8,9,10); First I want to apply a limit of 6 based on current key = 3 so the so the array should return: 3,4,5,6,7,8 If I press the next link the array should return: 4,5,6,7,8,9; If I press previous link the array should return: 2,3,4,5,6,7.
0
[ 2, 4496, 7718, 2065, 432, 27, 328, 1246, 54, 1158, 1246, 60, 800, 3726, 3726, 31, 57, 40, 7718, 16, 5078, 325, 947, 18, 835, 20, 45, 5579, 96, 723, 220, 325, 947, 18, 800, 7718, 5, 15793, 15, 240, 15, 300, 15, 264, 15, 379, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 prev() on first index of array return the last index === I'm looking for a way to make the `prev()` function to keep rewinding (starting from the end instead) when used on the first index. Consider the following example: $foo = array(1, 2, , ..., 12); echo current($foo) // output: 1 echo prev($foo) // should output 12 - returns FALSE I could, of course, write a function to somehow satisfy my needs, but I'm pretty sure that I must be overlooking something since this is pretty simple behavior.
0
[ 2, 544, 782, 710, 5, 6, 27, 64, 4348, 16, 7718, 788, 14, 236, 4348, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 161, 20, 233, 14, 13, 1, 3515, 710, 5, 6, 1, 1990, 20, 643, 302, 7809, 68, 13, 5, 13680, 68, 37, 14, 241, 700,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Cant connect to remote mysql DB throu VPN === first i want to apologize for my bad english. I am also a beginner to php mysql and all that stuff. i need some help configuring my connection to my db web server on a static ip address in internet My aim is to connect from my home pc to the mysql Db on the server in internet. I need to connect with php script to the DB to get some records every one hour. (The php script and mysql is working ok on my testenvironment) i have been trying for weeks now and i have no idea whats wrong in my configurations. I hope someone can help me out. My configurations: --Server--- Windows web server 2008 R2 iis 7.5 Php + Mysql 5.5.11 --Server-- --Home PC-- Windows xp Sp3 xampp --Home PC-- i have a vpn connection to the server Server ip 10.2.5.9 Home pc ip 10.2.5.10 --Mysql-- Mysql user : sam (for connection from remote) from Host : % permissions select, insert, update, delete --Mysql-- --firewall-- exeption added and aktivated Protokoll TCP lokal port 3070 remote port all range for ips vpn address 10.2.5.9 127.0.0.1 range for remote ip 127.0.0.1 vpn address 10.2.5.10 --firewall-- I can connect to the server over the vpn with remotedesktop and administer the db lokaly My problem when i try to connect throu the vpn to the server with the php script i get the error cant connect to mysql server on 10.2.5.9 (10060) when i try to telnet 10.2.5.9 3070 cant connect to host on port 3070 ping works on both direktion i also have tried with bind-address=0.0.0.0 it didnt helped ---Error log-- Error LOG 120708 12:10:48 [Note] Plugin 'FEDERATED' is disabled. 120708 12:10:48 InnoDB: The InnoDB memory heap is disabled 120708 12:10:48 InnoDB: Mutexes and rw_locks use Windows interlocked functions 120708 12:10:48 InnoDB: Compressed tables use zlib 1.2.3 120708 12:10:48 InnoDB: Initializing buffer pool, size = 558.0M 120708 12:10:49 InnoDB: Completed initialization of buffer pool 120708 12:10:49 InnoDB: highest supported file format is Barracuda. 120708 12:10:49 InnoDB: Waiting for the background threads to start 120708 12:10:50 InnoDB: 1.1.6 started; log sequence number 1598354 120708 12:10:50 [Note] Event Scheduler: Loaded 0 events 120708 12:10:50 [Note] C:\DB\MySQL\bin\mysqld: ready for connections. Version: '5.5.11' socket: '' port: 3070 MySQL Community Server (GPL) --Error log-- this is the part where i have made changes --My.ini--(im using my-huge.ini) [client] port=3070 [mysql] default-character-set=latin1 # SERVER SECTION # ---------------------------------------------------------------------- # # The following options will be read by the MySQL Server. Make sure that # you have installed the server correctly (see above) so it reads this # file. # [mysqld] # The TCP/IP Port the MySQL Server will listen on port=3070 log_error="D:/Mysqlerrors.log" log_warnings=2 # bind-address=127.0.0.1 #Path to installation directory. All paths are usually resolved relative to this. basedir="c:/DB/MySQL/" #Path to the database root datadir="c:/MySQL/MySQL Server 5.5/Data/" --my.ini-- What am i doing wrong? Please help Samo
0
[ 2, 2973, 6379, 20, 5388, 51, 18, 22402, 13, 9007, 13, 96, 8821, 13, 10924, 103, 800, 3726, 3726, 64, 31, 259, 20, 12059, 26, 51, 896, 486, 9, 31, 589, 67, 21, 26931, 20, 13, 26120, 51, 18, 22402, 17, 65, 30, 3217, 9, 31, 376...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 wxLua with LuaJIT on Mac OS X === How do you build wxLua on Mac OS X (10.6.8) so that it uses LuaJIT2 instead of the standard Lua interpreter? I have tried: ./configure --with-lua-prefix=/Users/finnw/LuaJIT-2.0.0-beta9 where `/Users/finnw/LuaJIT-2.0.0-beta9` is the directory in which I built LuaJIT. I have also tried copying `src/libluajit.a` to `lib/liblua5.1.a` and `src/libluajit.so` to `lib/liblua5.1.so` and various other combinations such as changing the extension from `.so` to `.dylib` But still I always get Lua not LuaJIT (as can be verified by loading a script that requires the `ffi` module.) How can I force it to link against LuaJIT2? And why does the `configure --with-lua-prefix` option not do what it claims to do?
0
[ 2, 12287, 619, 396, 2377, 58, 29, 1612, 17102, 38, 27, 1572, 13, 759, 993, 800, 3726, 3726, 184, 107, 42, 1895, 619, 396, 2377, 58, 27, 1572, 13, 759, 993, 13, 5, 1036, 9, 379, 9, 457, 6, 86, 30, 32, 2027, 1612, 17102, 38, 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 is prototype necessary for inheritance in javascript === I was trying to learn OO techniques in javascript. Most of the web sites use prototype inheritance. But, I am trying to understand why the following is bad (and still can achieve what prototype inheritance can do): //create parent class var Person = function (vId, vName) { this.Id = vId; this.Name = vName; this.Display = function () { alert("Id=" + this.Id); } }; //create new class var Emp = function (vId, vName, vOfficeMail) { Person.call(this, vId, vName) this.OfficeEmail = vOfficeMail; this.Display = function () { alert("Id=" + this.Id + ", OfficeMail=" + this.OfficeEmail); } }; //create instance of child class var oEmp = new Emp(1001, "Scott", "a@a.com"); //using Child's constructor //call display method in child class oEmp.Display(); //create instance of parent class var oPerson = new Person(1002, "Smith"); //using Parent's constructor //call display method in parent class oPerson.Display();
0
[ 2, 483, 25, 7063, 2378, 26, 13852, 19, 8247, 8741, 800, 3726, 3726, 31, 23, 749, 20, 2484, 13, 4328, 4212, 19, 8247, 8741, 9, 127, 16, 14, 2741, 3259, 275, 7063, 13852, 9, 47, 15, 31, 589, 749, 20, 1369, 483, 14, 249, 25, 896,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 unit for the Three js objects? === var camera = new THREE.PerspectiveCamera( 35, // Field of view 800 / 640, // Aspect ratio .1, // Near 10000 // Far ); var cube = new THREE.Mesh( new THREE.CubeGeometry( 5, 5, 5 ), new THREE.MeshLambertMaterial( { color: 0xFF0000 } ) ); In camera, what is the unit for Near and Far parameters. In Cube what is the unit of the parameters for CubeGeometry Please point me to the url where, i can find details about Object space - (the local axis used to draw an object) World space - (the global axis)
0
[ 2, 98, 25, 14, 1237, 26, 14, 132, 487, 18, 3916, 60, 800, 3726, 3726, 4033, 3336, 800, 78, 132, 9, 1432, 7350, 1284, 24636, 5, 2694, 15, 12894, 575, 16, 1418, 7993, 13, 118, 13, 19780, 15, 12894, 7289, 4825, 13, 9, 165, 15, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Removing tagged object from ScrollView === I have a lot of images in a scrollView, all the same, one after another, and a delete button as a subview of each. I assign a tag in this way 1) img.tag = i; 2) int z; z = i+1; buttonDelete.tag = z; and i is a for loop. when I press the button this code is executed: -(IBAction)deleteMessage:(id)sender{ UIButton *button = (UIButton*) sender; NSLog(@"Clicked button %d", button.tag); UIImageView *image = (UIImageView*) sender; NSLog(@"Clicked button %d", image.tag); int n; n = button.tag; for (UIImageView *img in imageArray){ if (img.tag == n) { [img removeFromSuperview]; NSLog(@"The value of integer num is %i", img.tag); NSLog(@"The value of integer num is %i", n); } } } According to the NSLog, the first four buttons correspond exactly to their tag, and to the image tag. The corresponding image is deleted. These four images all fit in the fist view of the scroll view. If there are more images though, and I need to scroll down, the tags don't increase anymore. Instead they restart from tag 1. So 1,2,3,4,1,2,3,4... and 1,2,3,4 can be seen in the same "page" of the scroll view. How can this be??
0
[ 2, 9096, 27945, 3095, 37, 12159, 4725, 800, 3726, 3726, 31, 57, 21, 865, 16, 3502, 19, 21, 12159, 4725, 15, 65, 14, 205, 15, 53, 75, 226, 15, 17, 21, 27448, 5167, 28, 21, 972, 4725, 16, 206, 9, 31, 13952, 21, 3383, 19, 48, 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...
Getting the column names of the selected row in SQL? === I have a program with 2 forms and both forms have their own grid. Grid1 is on form1, Grid2 is on form2. I want Grid2 to serve as a pop up window which is used for editing. When a user doubleclicks a row on Grid1, it should do a requery on just that row and display that single row on Grid2. I can't figure out how to get the column names of the selectedrow then do a query on it's unique identifers. What I have so far: (This is on form1 by the way) Public Sub dgvForm1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvForm1.CellDoubleClick Dim i As Integer = 0 Dim rowIndex As Integer Dim cellName as string While dgvForm1.SelectedRows.Item(0).Cells(i).ColumnIndex < dgvForm1.ColumnCount rowIndex = dgvForm1.SelectedRows.Item(0).HeaderCell.RowIndex cellName = dgvForm1.SelectedRows.Item(0).HeaderCell.toString Select Case cellName Case "control_no" Dim sControlNum = cellName.ToString Case "store_id" Dim sStoreNum = cellName.ToString End Select i = i + 1 End While end sub I simply just want the user to doubleclick a row that is displayed on a datagridview with many other records, and that triggers a doubleclick event. This would then loop through the selectedrow's column names until it finds both control_id and store_id and gets their values. P.s. I tried google for a good hour or so but I had a hard time getting any techniques to work. Sorry for ugly indenting, my code is alot cleaner but I think the crammed unindented code may be a result of being on a remote desktop connection with javascript and basically all features disabled.
0
[ 2, 1017, 14, 4698, 1817, 16, 14, 1704, 3131, 19, 4444, 255, 60, 800, 3726, 3726, 31, 57, 21, 625, 29, 172, 1997, 17, 156, 1997, 57, 66, 258, 7354, 9, 7354, 165, 25, 27, 505, 165, 15, 7354, 135, 25, 27, 505, 135, 9, 31, 259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 datepicker unable to capture value of SUBMIT control in code behind === I am using the JQyery datepicker control. The control displays properly but I am unable to get the selected value in my code behind page. I attempt to capture the user-selected value using: DateTime StartDt = Convert.ToDateTime(Request.Form["datepicker"]); The user has several controls to select and then hits submit. After submitting, when I inspect that value of StartDt it is: 01/01/0001 00:00:00AM **ASPX page:** <%@ Page Title="Fox Cities Restaurant Guide-Food Events" Language="C#" MasterPageFile="~/main_master.Master" AutoEventWireup="true" CodeBehind="Events.aspx.cs" Inherits="FCGuide.Events" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> <link href="Styles/jquery-ui-1.8.21.custom.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> $(document).ready(function () { $("#datepicker").datepicker(); }); </script> <style type="text/css"> #datepicker { width: 110px; height: 19px; } </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div id="defaultEvent"> <div id="EventNav"> <div id="EventType" class="EventNavDivs"> <span class="EventTitle">Event Type</span> <br /> <asp:DropDownList ID="ddlEventType" runat="server"> <asp:ListItem>Any Event</asp:ListItem> <asp:ListItem>Art Shows</asp:ListItem> <asp:ListItem>Farmers' Market</asp:ListItem> <asp:ListItem>Festival</asp:ListItem> <asp:ListItem>Restaurant Opening</asp:ListItem> </asp:DropDownList> </div> <div id="EventDate" class="EventNavDivs"> <span class="EventTitle">Event Date</span> <br /> <%--<asp:TextBox ID="datepicker" runat="server"></asp:TextBox>--%> <input id="datepicker" type="text" size="50px" maxlength="12" /> </div> <div id="EventLocation" class="EventNavDivs"> <span class="EventTitle">Location</span> <br /> <asp:DropDownList ID="ddlEventCity" runat="server"> </asp:DropDownList> </div> <div id="EventBtn" class="EventNavBtn"> <br /><asp:Button ID="btnFindEvents" runat="server" Text="Submit" onclick="btnFindEvents_Click" /> </div> </div> </div> </div> </asp:Content> **Code Behind page:** protected void btnFindEvents_Click(object sender, EventArgs e) { string EventType = ddlEventType.SelectedValue; DateTime StartDt = Convert.ToDateTime(Request.Form["datepicker"]); string City = ddlEventCity.SelectedValue; BLgetEvents obj = new BLgetEvents(); var EventList = obj.getAllEvents(StartDt); ListEvents.DataSource = EventList; ListEvents.DataBind(); }
0
[ 2, 487, 8190, 93, 1231, 16855, 106, 2343, 20, 3683, 1923, 16, 12298, 569, 19, 1797, 439, 800, 3726, 3726, 31, 589, 568, 14, 487, 1251, 93, 3849, 1231, 16855, 106, 569, 9, 14, 569, 9412, 7428, 47, 31, 589, 2343, 20, 164, 14, 1704...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Visual Studio 2010 My.Settings import === I have a solution with multiple projects in, and all need to share the same My.Settings, or at least have local copies of the same set. How do I get the My.Settings from one of the projects into the others?
0
[ 2, 3458, 1120, 498, 51, 9, 19831, 18, 9010, 800, 3726, 3726, 31, 57, 21, 4295, 29, 1886, 2314, 19, 15, 17, 65, 376, 20, 1891, 14, 205, 51, 9, 19831, 18, 15, 54, 35, 639, 57, 375, 3298, 16, 14, 205, 309, 9, 184, 107, 31, 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, 0...
Custome pages of each "Q type" from Quiz module === I'm using the Quiz module, that I use to create Quizzez. Right now, they are all using the same page layout for each question I ask. But I also want to customize the page for each question with some base page layouts. How would I go about doing that.
0
[ 2, 5816, 62, 4434, 16, 206, 13, 7, 1251, 1001, 7, 37, 17667, 12613, 800, 3726, 3726, 31, 22, 79, 568, 14, 17667, 12613, 15, 30, 31, 275, 20, 1600, 17667, 1734, 380, 9, 193, 130, 15, 59, 50, 65, 568, 14, 205, 2478, 9106, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 - Listview - disable blue border for selected item === I have a ListView with Horizontal WrapPanel as its ItemsPanelTemplate. I want to get rid of the blue background for selected item. It is visible only on the left of the selected item. There are many similar question on SO and I tried a lot of the solutions and none of them worked. This is what I have already tried: <ListView.Resources> <Style TargetType="{x:Type ListViewItem}"> <Style.Resources> <!-- Foreground for Selected ListViewItem --> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/> <!-- Background for Selected ListViewItem --> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/> <!--SelectedItem without focus--> <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/> </Style.Resources> </Style> </ListView.Resources> <ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <EventSetter Event="Control.MouseDoubleClick" Handler="HandleSelectedItemDoubleClick"/> <Style.Triggers> <Trigger Property="IsSelected" Value="true"> <Setter Property="RenderTransform"> <Setter.Value> <ScaleTransform ScaleX="2" ScaleY="2" CenterX="12" CenterY="12" /> </Setter.Value> </Setter> <Setter Property="Panel.ZIndex" Value="150"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="BorderBrush" Value="{x:Null}" /> <Setter Property="Background" Value="{x:Null}" /> </Trigger> </Style.Triggers> </Style> </ListView.ItemContainerStyle> <ListView.ItemsPanel> <ItemsPanelTemplate> <WrapPanel Orientation="Horizontal" Width="210" Margin="15" /> </ItemsPanelTemplate> </ListView.ItemsPanel>
0
[ 2, 619, 7721, 13, 8, 968, 4725, 13, 8, 1460, 579, 705, 1862, 26, 1704, 9101, 800, 3726, 3726, 31, 57, 21, 968, 4725, 29, 10095, 8118, 3206, 532, 28, 82, 3755, 3206, 532, 9577, 6554, 9, 31, 259, 20, 164, 6681, 16, 14, 705, 2395...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
maven-antrun-plugin does not run my shell command properly - is it some escaping issue? === been debugging for an hour `maven-antrun-plugin` with outputproperty: <tasks> <exec outputproperty="outp" executable="sh"> <arg value="-c" /> <arg value="${inp}" /> </exec> <echo>[hello] ${inp}</echo> <echo>[hello] ${outp}</echo> </tasks> everything works when my arg is simple: <inp>svn --non-interactive info | cat</inp> but when my arg is complex: <inp>svn --non-interactive info | sed -nr &apos;s/.+svn\/linking\/(branches\/|tags\/)?(.+)\/make-lion-app/\2/p&apos;</inp> the output stays empty but when I copy paste the input into a command line it works :( what am I missing here? working: [INFO] [antrun:run {execution: default}] [INFO] Executing tasks [echo] [hello] svn --non-interactive info | cat [echo] [hello] Path: . [echo] URL: http://svn.rnd.fsc.local/svn/linking/bra... not working: [INFO] Executing tasks [echo] [hello] svn --non-interactive info | sed -nr 's/.+svn\/linking\/(branches\/|tags\/)?(.+)\/make-lion-app/\2/p' [echo] [hello] but when I copy paste just what ant takes as its input, it works! > sh -c "svn --non-interactive info | sed -nr 's/.+svn\/linking\/(branches\/|tags\/)?(.+)\/make-lion-app/\2/p'" 20120521_lynx_v1.6
0
[ 2, 1216, 3124, 8, 1830, 3169, 8, 18527, 5831, 630, 52, 485, 51, 3593, 1202, 7428, 13, 8, 25, 32, 109, 14700, 1513, 60, 800, 3726, 3726, 74, 121, 16254, 2762, 26, 40, 1671, 13, 1, 540, 3124, 8, 1830, 3169, 8, 18527, 5831, 1, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
fire treeloader with new url on node click extjs 3 === I am trying append child nodes to a tree node when the node is clicked. It is required to fire a tree loader with desired url whenever a particular node is clicked. I tried something like this tree.dataUrl = '/zport/clusterSysReg?args=/directory/'+node.attributes.name; //alert(tree.dataUrl); node.reload(); whenever I click on a node the child nodes are created but not with the new url, but with the old url, I also tried node.load instead of node.reload(), but I am getting an error ......... Any idea how to proceed
0
[ 2, 535, 1541, 8294, 106, 29, 78, 287, 6362, 27, 15421, 10840, 1396, 38, 728, 18, 203, 800, 3726, 3726, 31, 589, 749, 4865, 2451, 850, 16272, 20, 21, 1541, 15421, 76, 14, 15421, 25, 15802, 9, 32, 25, 1390, 20, 535, 21, 1541, 6305...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Regex find then replace for all instances (C#) === I have a string filled with script tags for Javascript files where I would like to replace all instances of .js with .min.js. I can't assume that the contents of the string will be in the same format as shown below. So I need to restrict the replace to within the src= part. I'm assuming that a regex would be best for this, but how would I go about doing the find, then replace for all instances? <script type=\"text/javascript\" src=\"../../Scripts/json.js\"></script><script type=\"text/javascript\" src=\"../../Scripts/Logger.js\"></script> <script type=\"text/javascript\" src=\"../../Scripts/PageHelper.js\"></script> The other consideration would be that I wouldn't want to replace .min.js where it is already defined as min.js.
0
[ 2, 7953, 1706, 477, 94, 3934, 26, 65, 13946, 13, 5, 150, 5910, 6, 800, 3726, 3726, 31, 57, 21, 3724, 1943, 29, 3884, 3383, 18, 26, 8247, 8741, 6488, 113, 31, 83, 101, 20, 3934, 65, 13946, 16, 13, 9, 728, 18, 29, 13, 9, 2160,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
face recognition as3 === I want to build flash application that can detect the user eyes color and hair color etc' Does anyone know about free library that I can use for this kind of project? Thanks,
0
[ 2, 276, 3514, 28, 240, 800, 3726, 3726, 31, 259, 20, 1895, 4433, 3010, 30, 92, 9092, 14, 4155, 194, 1665, 17, 627, 1665, 2722, 22, 630, 1276, 143, 88, 551, 1248, 30, 31, 92, 275, 26, 48, 825, 16, 669, 60, 3669, 15, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
oracle intersect doesn't work === In the Oracle PL/SQL, why this code doesn't compile ? Oracle doesn't support intersect ? intersect only takes one column value ? assume two table have same column types. Thanks select B.name, B.id from tmp_B B where B.id in (select distinct id from tmp_A); intersect select distinct A.name, A.id from tmp_A A; error message Error report: Unknown Command
0
[ 2, 15759, 17822, 1437, 22, 38, 170, 800, 3726, 3726, 19, 14, 15759, 12443, 118, 18, 22402, 15, 483, 48, 1797, 1437, 22, 38, 26561, 13, 60, 15759, 1437, 22, 38, 555, 17822, 13, 60, 17822, 104, 1384, 53, 4698, 1923, 13, 60, 7158, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Which is better option for saving information in Android? === I'm considering about two data types for storing information in Android. The information will be structured e.g. each entry will have (time, date, type, value, comment) values and I thinking about using SQLite database. But I also think that Shared Preference is also good opinion because is easy to use (for reading and writing) and it's for saving private data in key-value pairs. Which is better option in this situation?
4
[ 2, 56, 25, 574, 4255, 26, 7599, 676, 19, 13005, 60, 800, 3726, 3726, 31, 22, 79, 5154, 88, 81, 1054, 2551, 26, 25615, 676, 19, 13005, 9, 14, 676, 129, 44, 17784, 13, 62, 9, 263, 9, 206, 2792, 129, 57, 13, 5, 891, 15, 1231, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Problems with recursive generic type in c# === I've got some C# code that compiles fine under both mono and the Microsoft's .net compilers, but only runs on mono. The error message is (newlines added by me) Unhandled Exception: System.TypeLoadException: Could not load type 'Hasse.Groups.Heavy.Product.PowerGroup`1' from assembly 'Hasse, Version=1.0.x.y, Culture=neutral, PublicKeyToken=null' because it has recursive generic definition. The type actually has a recursive generic definition, so my question is: why does it work with mono? [The code runs and produces the expected result] Full source code is here: https://github.com/miniBill/Hasse
0
[ 2, 1716, 29, 302, 24244, 12733, 1001, 19, 272, 5910, 800, 3726, 3726, 31, 22, 195, 330, 109, 272, 5910, 1797, 30, 26561, 18, 1123, 131, 156, 4129, 17, 14, 7099, 22, 18, 13, 9, 2328, 21486, 18, 15, 47, 104, 1461, 27, 4129, 9, 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...
Loading icons for web application dynamically === I have ExtJS application and and I develop it sometimes. I don't want to specify each icon explicitly with CSS because there are too much icons ( http://p.yusukekamiyamane.com/ ), I just want to write the icon's name and go with it. What kind of solution can help me?
0
[ 2, 12797, 9801, 18, 26, 2741, 3010, 7782, 1326, 800, 3726, 3726, 31, 57, 1396, 38, 728, 18, 3010, 17, 17, 31, 2803, 32, 1030, 9, 31, 221, 22, 38, 259, 20, 19077, 206, 9801, 13108, 29, 272, 18, 18, 185, 80, 50, 266, 212, 9801, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Generic Delegate Duplicate Definiation - Why? === So I have two generic delegates that I am atttempting to define that the compiler is complaining that they are duplicates, but to my eye are completely different. What am I doing/understanding wrong? delegate TReturn foo<TParameter, out TReturn>(TParameter parameter, IItem item); and delegate TReturn foo<TParameter, out TReturn>(TParameter parameter, int field, IItem item); If I add a new generic parameter to the second delegate, everything works. delegate TReturn foo<TParameter, TField, out TReturn>(TParameter parameter, TField field, IItem item) where TField struct but that is does not appear to be correct. I will always be passing an int for field - it should not be a generic.
0
[ 2, 12733, 11300, 19429, 6312, 2651, 857, 13, 8, 483, 60, 800, 3726, 3726, 86, 31, 57, 81, 12733, 10845, 30, 31, 589, 35, 38, 9577, 1203, 20, 9267, 30, 14, 21486, 25, 20154, 30, 59, 50, 19429, 18, 15, 47, 20, 51, 1356, 50, 1524...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Java printing on JES === First off, by JES, I mean Job Entry Subsystem, not Java Enterprise System. Anyway, my question is: Is it possible to print a PDF straight to the JES printer from a java program, that acts as a service on CICS, that is called from a SOAP UI WSDL that goes through SOA style COBOL programs. It's pretty much: SOAP --> COBOL --> Java --> PDF Generator Class --> Print through the JES --> return; I just want to know if it's possible to do without doing a batch job.
0
[ 2, 8247, 7312, 27, 4641, 18, 800, 3726, 3726, 64, 168, 15, 34, 4641, 18, 15, 31, 884, 1205, 2792, 972, 10724, 15, 52, 8247, 6002, 329, 9, 2774, 15, 51, 1301, 25, 45, 25, 32, 938, 20, 4793, 21, 13, 11124, 1599, 20, 14, 4641, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 compare current and manual NSDate === there is a function where option NSDate is specified putting up manually. How can I prevent execution of the function with the parameter of time, less than the current time? I have tried this if ([currentDate timeIntervalSinceDate: myTime] < 0) but unfortunately sometimes it doesn't work Thanks in advance.
0
[ 2, 184, 20, 11590, 866, 17, 5132, 13, 2172, 8209, 800, 3726, 3726, 80, 25, 21, 1990, 113, 4255, 13, 2172, 8209, 25, 9931, 3873, 71, 23671, 9, 184, 92, 31, 2501, 5769, 16, 14, 1990, 29, 14, 18906, 16, 85, 15, 787, 119, 14, 866,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-Two Sounds in app === I am hearing two sounds in some devices when i click a button.it is working fine on galaxy sl android2.3.6,htc desire android2.3.5,galaxy s2 android2.3.6 & in android eclipse emulators of different OS versions.But it is giving me two sounds in devices galaxy s android2.1,HTC test device android1.6.can you help me out?Is it problem because the devices are not updated?
0
[ 2, 13005, 8, 3734, 2795, 19, 4865, 800, 3726, 3726, 31, 589, 3229, 81, 2795, 19, 109, 4690, 76, 31, 10840, 21, 5167, 9, 242, 25, 638, 1123, 27, 9358, 13718, 13005, 135, 9, 240, 9, 379, 15, 9020, 150, 3150, 13005, 135, 9, 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...
Custom Query to Filter Taxonomy by another Taxonomy === I am trying to find out how to write a custom query for my wordpress listings theme to filter a taxonomy by another taxonomy. On my site I have * Custom Post * Taxonomy (service) * Taxonomy (Location) The query would have to retrieve a list of all States and Cities that are related to the Service. However, the only way they are related is via the listing post. So I guess I would need to write a custom query returning all posts for that particular service, and then loop through it and build up a list of each State/City. Then output the list of States/Cities with a link to that taxonomy term's archive page. If anyone has any idea how to do this, would be great to hear! Thanks
0
[ 2, 5816, 25597, 20, 11945, 26802, 34, 226, 26802, 800, 3726, 3726, 31, 589, 749, 20, 477, 70, 184, 20, 2757, 21, 5816, 25597, 26, 51, 833, 5890, 9554, 18, 3184, 20, 11945, 21, 26802, 34, 226, 26802, 9, 27, 51, 689, 31, 57, 1637,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Unique values between two matrices === I have 2 matrices: T3(:,:,1) = 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 3 0 0 0 0 0 1 0 1 4 2 0 4 0 0 3 0 2 6 3 0 5 0 2 4 2 5 7 5 4 6 5 4 5 5 7 8 8 5 7 6 5 6 6 8 9 9 8 9 8 T3(:,:,2) = 2 1 1 1 1 1 1 1 1 3 3 2 2 2 2 2 2 2 4 4 4 3 3 3 3 3 3 5 5 5 5 4 4 4 4 4 6 6 6 6 6 5 5 5 5 7 7 7 7 7 7 6 6 6 8 8 8 8 8 8 8 7 7 9 9 9 9 9 9 9 9 8 How do I make values present in T3(:,:,1) turn to zero in T3(:,:,2)? e.g. in the first column of T3(:,:,1) the values are 2,4,5. I'd like the first column of T3(:,:,2) to have the the values 2,4,5 as zero. I can perhaps do this in a loop but I wonder if there is a way to do this using setdiff or unique. Many thanks guys.
0
[ 2, 2619, 4070, 128, 81, 24849, 800, 3726, 3726, 31, 57, 172, 24849, 45, 13, 38, 240, 5, 45, 15, 45, 15, 165, 6, 800, 713, 713, 713, 713, 137, 713, 713, 713, 713, 713, 713, 713, 713, 172, 713, 713, 713, 713, 713, 713, 713, 71...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.NET MVC client valitation on ui-dialog? === Razor: @Html.TextBoxFor(kod => kod.Name) @Html.ValidationMessage("Name","Client Error Message") Controller: [HttpPost] public JsonResult JsonAddCustomer(Customers customer, string returnUrl) { if (customer.Name.Trim().Length == 0) { ModelState.AddModelError("Name", "Server Error Message"); } //Eğer hata yoksa veri tabanına kayıt yapılıyor. if (ModelState.IsValid) { try { CusOpp.InsertCustomer(customer); return Json(new { success = true, redirect = returnUrl }); } catch (Exception e) { ModelState.AddModelError("", "Error"); } } return Json(new { errors = GetErrorsFromModelState() }); } I want to write validation error message. I did this like above, but `@Html.ValidationMessage("Name","Client Error Message")` does not work. In fact, I was already expecting it. I want to show like this statement's result: `@Html.ValidationMessageFor(m => m.name)` ,but I cant use this, because I used entity-data-model. Should I add `[Required]` statement to data-model classes or any way that I do this. Sorry for bad explanation. Thanks.
0
[ 2, 28, 306, 9, 2328, 307, 8990, 6819, 13, 18506, 8593, 27, 13, 5661, 8, 4286, 5567, 60, 800, 3726, 3726, 14282, 45, 13, 1, 15895, 9, 11969, 5309, 1106, 5, 921, 43, 800, 1, 1584, 43, 9, 7259, 6, 13, 1, 15895, 9, 18506, 43, 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...
Conceptual help on implementing a rating system that lets items decrease in time === I am running a website that lets users contribute by letting them upload files on specific subjects. Right now my rating system is the worst possible (number of downloads of the file). Not only is this highly inaccurate in terms of quality control but also does it prevent new content to become listed on top anytime soon. This is why I want to change my rating system so that users can up-/down-vote each item. However this should not be the only factor to display the popularity of such item. I would like to have older content to decrease in rating over time. Maybe I could even factor in the amount of downloads but to a very low percentage. So, my questions are: 1. Which formula would you suggest under the assumption that there is 1 new upload every day? 2. How would you implement this in a php/mysql environment? My problem is that right now I am simply sorting my stuff by the `downloads` row in the database. How can I sort a query by a factor that is calculated externally (in php) or do I have to update a new row in my table with the rating factor each time someone calls the site in his browser? (Please excuse any mistakes, I am not a native speaker)
0
[ 2, 14425, 448, 27, 17333, 21, 4647, 329, 30, 6884, 3755, 9826, 19, 85, 800, 3726, 3726, 31, 589, 946, 21, 2271, 30, 6884, 3878, 8606, 34, 4252, 105, 71, 8294, 6488, 27, 1903, 4739, 9, 193, 130, 51, 4647, 329, 25, 14, 4126, 938, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 access MySQL with XQuery in PHP? === I am new to PHP and I only heard about Zorba. Basically we need to convert MySQL tables into our JSON format through XQuery. Is there a library to connect Zorba to MySQL ? It also seems that Zorba needs a native extension on the destination server and that makes it pretty useless to us. We'd like to use XQuery because our entire system is basing on and we've to cope hundreds of queries. Thank you
0
[ 2, 184, 20, 1381, 51, 18, 22402, 29, 993, 8190, 93, 19, 13, 26120, 60, 800, 3726, 3726, 31, 589, 78, 20, 13, 26120, 17, 31, 104, 752, 88, 13373, 969, 9, 11374, 95, 376, 20, 8406, 51, 18, 22402, 7484, 77, 318, 487, 528, 2595, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Error when trying to copy a hashmap store === When i try tto copy a store i get a few errors. The errors are: choice:java.io.NotSerializableException: Employee at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.HashMap.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at FileUtility.save(FileUtility.java:27) at MainApp.start(MainApp.java:190) at MainApp.main(MainApp.java:16) Here is also my code: MainApp //--------------------------------------------------------------------------------------- // Name: Case 7: Store. // Description: Choice 7 gives the user an option to copy and read a store // using read and write class from Java. //--------------------------------------------------------------------------------------- case 7: System.out.println("Store"); EmployeeStore copyMyStore = Store.copy(); System.out.println(copyMyStore); //print contents to check equality //shallow copy would look like this... EmployeeStore shallowCopyMyStore; //both variables point to same object shallowCopyMyStore = Store; //lets store and re-load the mystore object FileUtility.save("myStore.store", Store); /*EmployeeStore loadedStore = (EmployeeStore)FileUtility.load("myStore.nmcg"); System.out.println("\n--- RELOADED STORE CONTENTS ---"); loadedStore.print(); //System.out.println("\n(static) Count: " + EmployeeStore.print);*/ break; File Utility import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; /** * <i>Use this class to save and load any type of object (i.e. a container class (e.g. PersonStore), an account, a task, a person) * @author NMCG * @version 1.0 */ public class FileUtility /*serialization - step 2*/ { /** * @param fileName relative or absolute file path (e.g. "name.txt" or "c:\\temp\\name.txt" * @param obj address of any object to be stored (i.e. a container class (e.g. PersonStore), an account, a task, a person) */ public static void save(String fileName, Object obj) { try { FileOutputStream fos = new FileOutputStream(fileName); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(obj); oos.flush(); oos.close(); fos.close(); } catch(Exception e) { System.out.println("Something bad happened during the save phase!"); e.printStackTrace(); } } /** * @param fileName relative or absolute file path (e.g. "name.txt" or "c:\\temp\\name.txt") * @return Object address of the object loaded into RAM from file */ public static Object load(String fileName) // "test.txt" { Object objectIn = null; try { FileInputStream fis = new FileInputStream(fileName); ObjectInputStream ois = new ObjectInputStream(fis); objectIn = ois.readObject(); ois.close(); fis.close(); } catch(Exception e) { System.out.println("Something bad happened during the save phase!"); e.printStackTrace(); } return objectIn; } } copy // --------------------------------------------------------------------------------------- // Name: Store copy. // --------------------------------------------------------------------------------------- public EmployeeStore copy() { // instanciate the destination copy and give same name EmployeeStore Copy = new EmployeeStore(); // by specifying the type of the entry in the for loop i.e. <> // we don't have to typecast the getKey() and getValue() methods // as shown in the commented out line inside the for loop for (Map.Entry<String, Employee> entry : map.entrySet()) { // getting each key-value and putting into the copy // theCopy.add((MovieKey)entry.getKey(), (Movie)entry.getValue()); Copy.add(entry.getValue()); } // return address of the new MovieStore object return Copy; } // ---------------------------------------------------------------------------------------
0
[ 2, 7019, 76, 749, 20, 4344, 21, 19170, 15022, 1718, 800, 3726, 3726, 76, 31, 1131, 13, 38, 262, 4344, 21, 1718, 31, 164, 21, 310, 11908, 9, 14, 11908, 50, 45, 1837, 45, 1004, 1385, 9, 1963, 9, 1270, 4104, 2815, 3186, 579, 10066,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Grails Spring Social Core Plugin === I am trying to write a grails app which uses spring-social-core grails plugin. I see that the demo given in github uses ConnectController and not ProviderSignInController. Is there any example I can find of using ProviderSignInController? Thanks
0
[ 2, 489, 7301, 18, 1573, 668, 2884, 10922, 108, 800, 3726, 3726, 31, 589, 749, 20, 2757, 21, 489, 7301, 18, 4865, 56, 2027, 1573, 8, 11559, 8, 10375, 489, 7301, 18, 10922, 108, 9, 31, 196, 30, 14, 8376, 504, 19, 13, 10404, 20926,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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: How to secure your code === if you render your page with JS and need to implement a security feature, it comes down to something this: var userID = getUserID(); if (userID == 1) { html += renderDeleteButton(); } But won't the user be able to just open the debugger and change the value of userID ?
0
[ 2, 8247, 8741, 45, 184, 20, 4315, 154, 1797, 800, 3726, 3726, 100, 42, 16535, 154, 2478, 29, 487, 18, 17, 376, 20, 8713, 21, 1221, 1580, 15, 32, 1624, 125, 20, 301, 48, 45, 4033, 275, 5175, 800, 164, 3699, 5175, 5, 6, 73, 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...
Extracting one node with LibXML === This may be very novice of me, but I am a novice at Perl LibXML (and XPath for that matter). I have this XML doc: <Tims xsi:schemaLocation="http://my.location.com/namespace http://my.location.com/xsd/Tims.xsd" xmlns="http://my.location.com/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink"> <Error>Too many entities for operation. Acceptable limit is 5,000 and 8,609 were passed in.</Error> <Timestamp>2012-07-27T12:06:24-04:00</Timestamp> <ExecutionTime>41.718</ExecutionTime> </Tims> All I want to do is get the value of `<Error>`. Thats all. I've tried plenty of approaches, most recently [this][1] one. I've read the docs through and through. This is what I currently have in my code: #!/usr/bin/perl -w my $xmlString = <<XML; <?xml version="1.0" encoding="ISO-8859-1"?> <Tims xsi:schemaLocation="http://my.location.com/namespace http://my.location.com/xsd/Tims.xsd" xmlns="http://my.location.com/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink"> <Error>Too many entities for operation. Acceptable limit is 5,000 and 8,609 were passed in.</Error> <Timestamp>2012-07-27T12:06:24-04:00</Timestamp> <ExecutionTime>41.718</ExecutionTime> </Tims> XML use XML::LibXML; my $parser = XML::LibXML->new(); my $doc = $parser->parse_string($xmlString); my $root = $doc->documentElement(); my $xpc = XML::LibXML::XPathContext->new($root); $xpc->registerNs("x", "http://my.location.com/namespace"); foreach my $node ($xpc->findnodes('x:Tims/x:Error')) { print $node->toString(); } Any advice, links, anything is appreciated. Thanks. [1]: http://stackoverflow.com/questions/8411684/xmllibxml-replace-element-value
0
[ 2, 10962, 68, 53, 15421, 29, 13, 8326, 396, 8184, 800, 3726, 3726, 48, 123, 44, 253, 21999, 16, 55, 15, 47, 31, 589, 21, 21999, 35, 416, 255, 13, 8326, 396, 8184, 13, 5, 290, 993, 8353, 26, 30, 1161, 6, 9, 31, 57, 48, 23504,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Layout invisible, button up on him === (i have put the code at the end of my post) i would like to make a hidden menu. I don't know if i take the good way. I have some button visible, some invisible button and at the an another visible button. One of the button in first layout have to set visible the hidden buttons. I would like to have the last button just after the first bunch. But like i have put invisible the Layout so i have an empty space. I would like when i pressed the button for set visible that the last button go down. I hope you will understand want i want to do and what i have done. <?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:background="@drawable/fond" > <ImageView android:id="@+id/imageView1" android:contentDescription="@string/desc" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/top" android:layout_gravity="top" android:adjustViewBounds="true" /> <LinearLayout android:layout_below="@+id/imageView1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:background="@drawable/fond2" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginLeft="30dp" android:layout_marginRight="30dp" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:weightSum="3" > <Button android:id="@+id/button_garçon" android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/Bg" android:background="@drawable/button_purple" android:layout_weight="1" android:textColor="#ffffff" android:onClick="actionGarçon" /> <Button android:id="@+id/button_mixte" android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/Bm" android:background="@drawable/button_purple" android:layout_weight="1" android:textColor="#ffffff" android:onClick="actionMixte" /> <Button android:id="@+id/button_fille" android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/Bf" android:background="@drawable/button_purple" android:layout_weight="1" android:textColor="#ffffff" android:onClick="actionFille" /> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:weightSum="1" > <Button android:id="@+id/button_param" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/Bp" android:background="@drawable/button_green" android:layout_weight="1" android:textColor="#ffffff" android:onClick="actionParametre" /> </LinearLayout> <!-- invisible --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:visibility="invisible" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/Tq" android:textColor="#000000" /> <EditText android:id="@+id/edit_message" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="@string/Emc" android:singleLine="true" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/Tpre" android:textColor="#000000" /> <EditText android:id="@+id/edit_message" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="@string/Epre" android:singleLine="true" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/Tsuf" android:textColor="#000000" /> <EditText android:id="@+id/edit_message" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="@string/Esuf" android:singleLine="true" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/Tl" android:textColor="#000000" /> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:weightSum="100" > <Button android:id="@+id/button_court" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/Blc" android:layout_weight="25" android:background="@drawable/button_purple" android:textColor="#ffffff" android:onClick="actionCourt" /> <Button android:id="@+id/button_moyen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/Blm" android:layout_weight="25" android:background="@drawable/button_purple" android:textColor="#ffffff" android:onClick="actionMoyen" /> <Button android:id="@+id/button_long" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/Bll" android:layout_weight="25" android:background="@drawable/button_purple" android:textColor="#ffffff" android:onClick="actionLong" /> <Button android:id="@+id/button_tous" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/Blt" android:layout_weight="25" android:background="@drawable/button_purple" android:textColor="#ffffff" android:onClick="actionTous" android:state_pressed="true" /> </LinearLayout> <Button android:id="@+id/button_orig" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/Bo" android:background="@drawable/button_purple" android:textColor="#ffffff" android:onClick="actionOrigine" /> </LinearLayout> <!-- /invisible --> <Button android:id="@+id/button_recher" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/Br" android:background="@drawable/button_green" android:textColor="#ffffff" android:onClick="actionRecherche" /> </LinearLayout> </LinearLayout> </LinearLayout> Thanks in advance.
0
[ 2, 9106, 8874, 15, 5167, 71, 27, 61, 800, 3726, 3726, 13, 5, 49, 57, 442, 14, 1797, 35, 14, 241, 16, 51, 678, 6, 31, 83, 101, 20, 233, 21, 3689, 11379, 9, 31, 221, 22, 38, 143, 100, 31, 247, 14, 254, 161, 9, 31, 57, 109,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Elasticsearch, Tire, and Nested queries/associations with ActiveRecord === I'm using ElasticSearch with Tire to index and search some ActiveRecord models, and I've been searching for the "right" way to index and search associations. I haven't found what seems like a best practice for this, so I wanted to ask if anyone has an approach that they think works really well. As an example setup (this is made up but illustrates the problem), let's say we have a book, with chapters. Each book has a title and author, and a bunch of chapters. Each chapter has text. We want to index the book's fields and the chapters' text so you can search for a book by author, or for any book with certain words in it. class Book < ActiveRecord::Base include Tire::Model::Search include Tire::Model::Callbacks has_many :chapters mapping do indexes :title, :analyzer => 'snowball', :boost => 100 indexes :author, :analyzer => 'snowball' indexes :chapters, type: 'object', properties: { chapter_text: { type: 'string', analyzer: 'snowball' } } end end class Chapter < ActiveRecord::Base belongs_to :book end So then I do the search with: s = Book.search do query { string query_string } end That doesn't work, even though it seems like that indexing should do it. If instead I index: indexes :chapters, :as => 'chapters.map{|c| c.chapter_text}.join('|'), :analyzer => 'snowball' That makes the text searchable, but obviously it's not a nice hack and it loses the actual associated object. I've tried variations of the searching, like: s = Book.search do query do boolean do should { string query_string } should { string "chapters.chapter_text:#{query_string}" } end end end With no luck there, either. If anyone has a good, clear example of indexing and searching associated ActiveRecord objects using Tire, it seems like that would be a really good addition to the knowledge base here. Thanks for any ideas and contributions.
0
[ 2, 931, 9428, 25136, 15, 11517, 15, 17, 5618, 69, 9386, 2829, 118, 29107, 18, 29, 1348, 14953, 800, 3726, 3726, 31, 22, 79, 568, 931, 9428, 25136, 29, 11517, 20, 4348, 17, 2122, 109, 1348, 14953, 2761, 15, 17, 31, 22, 195, 74, 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...
Syntaxhighlighter is not working on blogger === Hi I've used following links: http://www.cyberack.com/2007/07/adding-syntax-highlighter-to-blogger.html I followed step by step but I couldn't get it working on my blog. It prints as its whatever is written there as if it ignoring the tag itself. Any help will be highly appreciated. Since it seems to be very simple task but I found it very strange why it's not working for me. Here is the link for my test blog: http://nishantcop.blogspot.sg/2012/07/blog-post_27.html
0
[ 2, 22649, 4542, 3130, 106, 25, 52, 638, 27, 24350, 800, 3726, 3726, 4148, 31, 22, 195, 147, 249, 6271, 45, 7775, 6903, 6483, 9, 2731, 863, 13135, 9, 960, 118, 2727, 118, 2984, 118, 58, 11365, 8, 9507, 15514, 8, 4542, 3130, 106, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 rotate image displayed on html button === hey I have refresh button in HTML and i want to rotate the image on that button when I click it. I have created effects using css as follows: input.button_refresh { margin-left: 600px; background: url("../images/refresh.JPG") 0 0 no-repeat scroll ; background-position: right; font-weight: bold; background-color: rgb(80,140,210); display: inline-block; cursor: pointer; height: 20px; /* height of the background image */ width: 70px; /* width of the background image */ color: threedface; border-radius: 6em; }
0
[ 2, 184, 92, 31, 21448, 1961, 6115, 27, 13, 15895, 5167, 800, 3726, 3726, 8409, 31, 57, 24905, 5167, 19, 13, 15895, 17, 31, 259, 20, 21448, 14, 1961, 27, 30, 5167, 76, 31, 10840, 32, 9, 31, 57, 679, 2292, 568, 272, 18, 18, 28, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
uipopovercontroller issues while click take photo option === i have a problem in uipopovercontroller while click the take photo option.i have a three option 1.take photo 2.open gallery 3.remove in popoverview while i'm using take photo option the popover frame size is automatically extended.but i gave default popover fame size this is not work properly.please share your ideas. The action i wrote like that, -(IBAction)business_takephotobtnClicked { appdelegate.takePhoto=2; popover = [[UIPopoverController alloc] initWithContentViewController:imgclass]; popover.popoverContentSize = CGSizeMake(139, 71); [popover presentPopoverFromRect:popbtn_business.bounds inView:popbtn_business permittedArrowDirections:UIPopoverArrowDirectionUp + UIPopoverArrowDirectionLeft animated:YES]; }
0
[ 2, 13, 5661, 6057, 2549, 12898, 1252, 1549, 133, 10840, 247, 3056, 4255, 800, 3726, 3726, 31, 57, 21, 1448, 19, 13, 5661, 6057, 2549, 12898, 1252, 133, 10840, 14, 247, 3056, 4255, 9, 49, 57, 21, 132, 4255, 137, 9, 4386, 3056, 172,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.net client developed with 4.0 SDK schould be converted in 2011 SDK (with support of Dynamics 4.0) === I have developed an asp client with 4.0 SDK. To work with Dynamics 2011 I use 2007 endpoints (they are there for backward compatibility). But since last month is only "Office 365" authetification possible (for new clients) and this authentification method doesn't support 2007 endpoints. How can I convert my application spending so less time as possible? CRM Dynamics 4.0 schould be supported. May be I schould start a new Project instead of redevelop an old one? Some info: To authetificate a user I get from CRM CRMPassport and use it for crmService calls (crm online). To work with endpoints i use a factory, which creates for me services: CrmService crmService = CrmServiceHandlerFactory.GetInstance().Resolve<ICrmServiceHandler>().CreateCrmService(crmCallInfo); BusinessEntityCollection userAttributesCol = ((RetrieveMultipleResponse)crmService.Execute(qbaRequest)).BusinessEntityCollection; I use metadata service the same way....
0
[ 2, 28, 306, 9, 2328, 6819, 885, 29, 268, 9, 387, 13, 18, 43, 197, 10252, 1287, 43, 44, 3494, 19, 542, 13, 18, 43, 197, 13, 5, 1410, 555, 16, 12289, 268, 9, 387, 6, 800, 3726, 3726, 31, 57, 885, 40, 28, 306, 6819, 29, 268, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Very weird unhandled exception error at if statement === So I have debugged my application and this is what the debugger told me: ![enter image description here][1] [1]: http://i.stack.imgur.com/AIpm2.png At the line: if(p_IS_TRUE(playerid,CHECK_INACTIVITY)) Which is defined as: #define p_IS_TRUE(playerid,check) (p_CheckForStuff[playerid] & check) So this is the important code: //global #define CHECK_SPAWNKILL (128) // 0000 0000 0000 0000 0000 0000 1000 0000 #define CHECK_INACTIVITY (256) // 0000 0000 0000 0000 0000 0001 0000 0000 #define CHECK_TELEPORT (512) // 0000 0000 0000 0000 0000 0010 0000 0000 #define CHECK_AIRBREAK (1024) // 0000 0000 0000 0000 0000 0100 0000 0000 unsigned long p_CheckForStuff[MAX_PLAYERS]; #define p_IS_TRUE(playerid,check) (p_CheckForStuff[playerid] & check) list<int> PlayerLoopList; //When a player connects PlayerLoopList.push_back(playerid); p_CheckForStuff[playerid] =-1;//enable all checks //When a player disconnects PlayerLoopList.remove(playerid); //ProcessTick int playerid = 0; int ProcessTicksize = 0; int ProcessTickindex = 0; for (list <int>::iterator i = PlayerLoopList.begin(); i != PlayerLoopList.end(); ++i) { playerid = *i; int playerstate = GetPlayerState(playerid); int vid = GetPlayerVehicleID(playerid); if(g_IS_TRUE(CHECK_INACTIVITY)) { if(p_IS_TRUE(playerid,CHECK_INACTIVITY)) { if(p_AcivityInfo[playerid].Reported == false) { and it can be reproduced as follow: 1) join the server 2) exit/ be kicked? 3) join again 4) crash Does anyone know why this is happening? the code looks perfect to me..
0
[ 2, 253, 5455, 367, 3203, 1294, 5391, 7019, 35, 100, 3331, 800, 3726, 3726, 86, 31, 57, 121, 2345, 15186, 51, 3010, 17, 48, 25, 98, 14, 121, 2345, 11356, 470, 55, 45, 13, 187, 2558, 13679, 1961, 5318, 235, 500, 2558, 165, 500, 63...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 is MySQL is returning some floats in scientific notation, but not others? === I'm writing a PHP script that looks through a DB table of float values, that tend to be somewhat small, such as: 0.00052 0.00134 0.00103 0.00149 0.00085 0.00068 0.00077 0.00088 0.00169 0.00063 For reasons unknown to me, some values appear in the DB in scientific notation, such as: 1.12305e-06 The table is set to float, and I've tried all manner of functions in PHP to force the numbers to display as decimal, to no avail. Try as I might, I'm unable to get this table of numbers to be consistently decimal in all cases. Any suggestions on how to resolve this? Have tried typcasting to `(float)` and using `number_format()` and several other options, but no change every time.
0
[ 2, 483, 25, 51, 18, 22402, 25, 2485, 109, 11510, 18, 19, 2272, 15591, 15, 47, 52, 654, 60, 800, 3726, 3726, 31, 22, 79, 1174, 21, 13, 26120, 3884, 30, 1879, 120, 21, 13, 9007, 859, 16, 11510, 4070, 15, 30, 5480, 20, 44, 4131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Voice Grammar for mobile application === Isn't any Open Source GRXML interpreter is available ? i m trying to build a voice driven mobile app using **Nuance Dragon SDK**. Basically SDK returns text of the recognised voice. i like to use Grxml grammars to Get the Actual Intent of the User. _isn't any open source GRXML interpreter is available ?_ any other suggestions ?
0
[ 2, 430, 7207, 26, 3241, 3010, 800, 3726, 3726, 2532, 22, 38, 186, 368, 1267, 7711, 396, 8184, 19336, 25, 904, 13, 60, 31, 307, 749, 20, 1895, 21, 430, 5355, 3241, 4865, 568, 13, 1409, 4215, 2416, 3339, 13, 18, 43, 197, 1409, 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...
Rspec Failure: undefined local variable or method `welcome_page_data_index_path' === Hi I have here a failure from running bundle exec rspec spec and this is what I've got 3) WelcomePageData GET /welcome_page_data works! (now write some real specs) ←[31mFailure/Error:←[0m ←[31mget welcome_page_data_index_path←[0m ←[31mNameError:←[0m ←[31mundefined local variable or method `welcome_page_data_index_path' for #<RSpec::Core::ExampleGroup::Ne sted_8::Nested_1:0x59315b8>←[0m ←[36m # ./spec/requests/welcome_page_data_spec.rb:7:in `block (3 levels) in <top (required)>'←[0m The spec/requests/welcome_page_data_spec.rb is: require 'spec_helper' describe "WelcomePageData" do describe "GET /welcome_page_data" do it "works! (now write some real specs)" do # Run the generator again with the --webrat flag if you want to use webrat methods/matchers get welcome_page_data_index_path response.status.should be(200) end end end What can I do to make it passed?
0
[ 2, 13, 1224, 12610, 2990, 45, 367, 13439, 375, 7612, 54, 2109, 13, 1, 16873, 1, 6486, 1, 18768, 1, 25671, 1, 8353, 22, 800, 3726, 3726, 4148, 31, 57, 235, 21, 2990, 37, 946, 10194, 1396, 3319, 13, 1224, 12610, 12737, 17, 48, 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...
Update UITextView value from C++ class === I need to implement a listener which update UITextView value, this value comes from c++ class. My first idea is to mix c++ and objective-c but I don't know if I write this : **Listener.h** class Listener { public: virtual void updateValue() = 0; } **MyListener.h** #import <UIKit/UIKit.h> class MyListener { private: UITextField *_text; public: MyListener(UITextField *); ~MyListener(); virtual void updateValue(NSString*); } **MyListener.cpp** MyListener::MyListener(UITextField *text) : _text(text) {} void MyListener::updateValue(NSString* value) { _text.text = value; }
0
[ 2, 11100, 13, 5661, 11969, 4725, 1923, 37, 272, 20512, 718, 800, 3726, 3726, 31, 376, 20, 8713, 21, 21772, 56, 11100, 13, 5661, 11969, 4725, 1923, 15, 48, 1923, 1624, 37, 272, 20512, 718, 9, 51, 64, 882, 25, 20, 2917, 272, 20512, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 send a hidden value to action class using Struts2 === I need to send a value to action class when a click on a link. This is my code: <s:iterator value="results" var = "item"> <li><pre><a href="<s:url action="getCompanies"/>" class="selectable"><b></b><s:property value="%{#item.getGroupName()}"/> (<span class="count"><s:property value="%{#item.getNrCompanies()}"/></span>)<s:hidden value="%#item.getGroupId()}" name="GroupId" id="GroupId" /></a></pre></li> </s:iterator> i need to be sent back "%#item.getGroupId()}"depending on the option i choose from iterator. <s:hidden value="%#item.getGroupId()}" name="GroupId" id="GroupId" /> I have the getter and setter for GroupId but it's does't reach action class. Thank you
0
[ 2, 184, 92, 31, 2660, 21, 3689, 1923, 20, 1028, 718, 568, 18316, 18, 135, 800, 3726, 3726, 31, 376, 20, 2660, 21, 1923, 20, 1028, 718, 76, 21, 10840, 27, 21, 3508, 9, 48, 25, 51, 1797, 45, 13, 1, 18, 45, 242, 106, 3457, 1923...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Integrating facebook event rsvp? === I want to integrate facebook rsvp with my websites events module i found http://www.sfstation.com/reel-big-fish-e1661272 did similar kind of stuff,can you please suggest how do i resolve this?
0
[ 2, 24529, 9090, 807, 13, 1224, 10924, 60, 800, 3726, 3726, 31, 259, 20, 18399, 9090, 13, 1224, 10924, 29, 51, 13931, 963, 12613, 31, 216, 7775, 6903, 6483, 9, 18, 410, 10839, 9, 960, 118, 99, 532, 8, 6407, 8, 4934, 8, 62, 13126,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 make this second ListView displayed (visible) after selecting a row in the first ListView? === I am a new ASP.NET developer and I have to create a quiz engine application. I am using three LiveView controls to show: 1. quiz information 2. question information (based on the selected quiz on the first ListView) 3. answers information (based on the selected question on the second ListView) I have the following database design: QuizContent Table: ID, QuizID, QuestionID, AnswerID, isCorrect Quiz Table: QuizID, Title, Description, isSent Question Table: QuestionID, Question, QuestionOrder, AnswerExplanation Answers Table: AnswerID, Answer **What I want now is the following:** when the user (who is the Admin) comes to the Quiz Engine Page, he should only see the first ListView which is mainly about the Quiz Information. And when he selects one of the quizzes, the second ListView will be displayed with the Question information of that selected quiz. And when he selects one of the questions, the third ListView will be displayed with the answers information of that selected question. **So how to do that?** I know I should not post too much code or information, but I have to do it to make it clear: <div align="center"> <asp:ListView ID="ListView1" runat="server" DataKeyNames="QuizID" DataSourceID="SqlDataSource1" InsertItemPosition="LastItem" > <EditItemTemplate> <tr style=""> <td> <asp:ImageButton ID="UpdateButton" ImageUrl="Images/icons/update24.png" ToolTip="Update" runat="server" CommandName="Update" /> <asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/cancel324.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /> </td> <td> <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /> </td> <td> <asp:TextBox ID="DescriptionTextBox" runat="server" Text='<%# Bind("Description") %>' /> </td> </tr> </EditItemTemplate> <EmptyDataTemplate> <table id="Table1" runat="server" style=""> <tr> <td> No data was returned.</td> </tr> </table> </EmptyDataTemplate> <InsertItemTemplate> <tr style=""> <td> <asp:ImageButton ID="InsertButton" ImageUrl="Images/icons/add24.png" ToolTip="Add" runat="server" CommandName="Insert" /> <asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/clear24.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /> </td> <%--<td> &nbsp;</td>--%> <td> <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /> </td> <td> <asp:TextBox ID="DescriptionTextBox" runat="server" Text='<%# Bind("Description") %>' /> </td> </tr> </InsertItemTemplate> <ItemTemplate> <tr style=""> <td> <asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /> <asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /> <asp:ImageButton ID="SelectButton" ImageUrl="Images/icons/select.png" ToolTip="Select" runat="server" CommandName="Select" /> <%--<asp:Button ID="SelectButton" runat="server" CommandName="Select" Text="Select" />--%> </td> <%--<td> <asp:Label ID="QuizIDLabel" runat="server" Text='<%# Eval("QuizID") %>' /> </td>--%> <td> <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' /> </td> <td> <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' /> </td> </tr> </ItemTemplate> <LayoutTemplate> <div ><table id="thetable" width="97%" cellpadding="0px" cellspacing="0px" style="margin:0px 0px 0px 0px; border:2px solid #003366; font-size:13px; font-weight:bold;"> <thead> <tr style="background-color:#C6D7B5;"> <th style="border-bottom:2px solid #003366; ">...</th> <th style="border-bottom:2px solid #003366; ">Title</th> <th style="border-bottom:2px solid #003366; ">Description</th> </tr> </thead> <tbody><tr id="itemPlaceholder" runat="server"></tr></tbody> </table></div> </LayoutTemplate> <SelectedItemTemplate> <tr style=""> <td> <asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /> <asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /> </td> <%--<td> <asp:Label ID="QuizIDLabel" runat="server" Text='<%# Eval("QuizID") %>' /> </td>--%> <td> <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' /> </td> <td> <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' /> </td> </tr> </SelectedItemTemplate> </asp:ListView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:QuizSysDBConnectionString %>" SelectCommand="SELECT * FROM [Quiz]" DeleteCommand="DELETE FROM [Quiz] WHERE [QuizID] = @QuizID" InsertCommand="INSERT INTO [Quiz] ([Title], [Description]) VALUES (@Title, @Description)" UpdateCommand="UPDATE [Quiz] SET [Title] = @Title, [Description] = @Description WHERE [QuizID] = @QuizID"> <DeleteParameters> <asp:Parameter Name="QuizID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="Description" Type="String" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="QuizID" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource> </div> <br /><br /> <%--Second ListView that will contain the content of the quiz--%> <div align="center"> <asp:ListView ID="ListView2" runat="server" DataSourceID="SqlDataSource2" DataKeyNames="QuestionID" InsertItemPosition="LastItem"> <EditItemTemplate> <tr style=""> <td> <asp:ImageButton ID="UpdateButton" ImageUrl="Images/icons/update24.png" ToolTip="Update" runat="server" CommandName="Update" /> <asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/cancel324.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /> </td> <%--<td> <asp:Label ID="QuestionIDLabel1" runat="server" Text='<%# Eval("QuestionID") %>' /> </td>--%> <td> <asp:TextBox ID="QuestionTextBox" runat="server" Text='<%# Bind("Question") %>' /> </td> <td> <asp:TextBox ID="QuestionOrderTextBox" runat="server" Text='<%# Bind("QuestionOrder") %>' /> </td> <td> <asp:TextBox ID="AnswerExplanationTextBox" runat="server" Text='<%# Bind("AnswerExplanation") %>' /> </td> </tr> </EditItemTemplate> <EmptyDataTemplate> <table runat="server" style=""> <tr> <td> No data was returned.</td> </tr> </table> </EmptyDataTemplate> <InsertItemTemplate> <tr style=""> <td> <asp:ImageButton ID="InsertButton" ImageUrl="Images/icons/add24.png" ToolTip="Add" runat="server" CommandName="Insert" /> <asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/clear24.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /> </td> <%--<td> &nbsp;</td>--%> <td> <asp:TextBox ID="QuestionTextBox" runat="server" Text='<%# Bind("Question") %>' /> </td> <td> <asp:TextBox ID="QuestionOrderTextBox" runat="server" Text='<%# Bind("QuestionOrder") %>'/> </td> <td> <asp:TextBox ID="AnswerExplanationTextBox" runat="server" Text='<%# Bind("AnswerExplanation") %>' /> </td> </tr> </InsertItemTemplate> <ItemTemplate> <tr style=""> <td> <asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="delete" runat="server" CommandName="Delete" /> <asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /> <asp:ImageButton ID="SelectButton" ImageUrl="Images/icons/select.png" ToolTip="Select" runat="server" CommandName="Select" /> <%--<asp:Button ID="SelectButton" runat="server" CommandName="Select" Text="Select" />--%> </td> <td> <asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' /> </td> <td> <asp:Label ID="QuestionOrderLabel" runat="server" Text='<%# Eval("QuestionOrder") %>' /> </td> <td> <asp:Label ID="AnswerExplanationLabel" runat="server" Text='<%# Eval("AnswerExplanation") %>' /> </td> </tr> </ItemTemplate> <LayoutTemplate> <div ><table id="thetable" width="97%" cellpadding="0px" cellspacing="0px" style="margin:0px 0px 0px 0px; border:2px solid #003366; font-size:13px; font-weight:bold;"> <thead> <tr style="background-color:#C6D7B5;"> <th style="border-bottom:2px solid #003366; ">...</th> <th style="border-bottom:2px solid #003366; ">Question</th> <th style="border-bottom:2px solid #003366; ">Question Order</th> <th style="border-bottom:2px solid #003366; ">Answer Explanation</th> </tr> </thead> <tbody><tr id="itemPlaceholder" runat="server"></tr></tbody> </table></div> </LayoutTemplate> <SelectedItemTemplate> <tr style=""> <td> <asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /> <asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /> </td> <td> <asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' /> </td> <td> <asp:Label ID="QuestionOrderLabel" runat="server" Text='<%# Eval("QuestionOrder") %>' /> </td> <td> <asp:Label ID="AnswerExplanationLabel" runat="server" Text='<%# Eval("AnswerExplanation") %>' /> </td> </tr> </SelectedItemTemplate> </asp:ListView> </div> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:QuizSysDBConnectionString %>" SelectCommand="SELECT [Question].* FROM [Question] INNER JOIN [QuizContent] ON [QuizContent].[QuizID] = @QuizID" DeleteCommand="DELETE FROM [Question] WHERE [QuestionID] = @QuestionID" InsertCommand="INSERT INTO [Question] ([Question], [QuestionOrder], [AnswerExplanation]) VALUES (@Question, @QuestionOrder, @AnswerExplanation)" UpdateCommand="UPDATE [Question] SET [Question] = @Question, [QuestionOrder] = @QuestionOrder, [AnswerExplanation] = @AnswerExplanation WHERE [QuestionID] = @QuestionID"> <DeleteParameters> <asp:Parameter Name="QuestionID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Question" Type="String" /> <asp:Parameter Name="QuestionOrder" Type="Int32" /> <asp:Parameter Name="AnswerExplanation" Type="String" /> <asp:ControlParameter ControlID="ListView1" Name="QuizID" PropertyName="SelectedValue" Type="Int32" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="Question" Type="String" /> <asp:Parameter Name="QuestionOrder" Type="Int32" /> <asp:Parameter Name="AnswerExplanation" Type="String" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="ListView1" Name="QuizID" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> <br /><br /> <%--Third ListView that will contain the content of the quiz--%> <div align="center"> <asp:ListView ID="ListView3" runat="server" DataSourceID="SqlDataSource3" DataKeyNames="AnswerID" InsertItemPosition="LastItem"> <EditItemTemplate> <tr style=""> <td> <asp:ImageButton ID="UpdateButton" ImageUrl="Images/icons/update24.png" ToolTip="Update" runat="server" CommandName="Update" /> <asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/cancel324.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /> </td> <%--<td> <asp:Label ID="AnswerIDLabel1" runat="server" Text='<%# Eval("AnswerID") %>' /> </td>--%> <td> <asp:TextBox ID="AnswerTextBox" runat="server" Text='<%# Bind("Answer") %>' /> </td> </tr> </EditItemTemplate> <EmptyDataTemplate> <table runat="server" style=""> <tr> <td> No data was returned.</td> </tr> </table> </EmptyDataTemplate> <InsertItemTemplate> <tr style=""> <td> <asp:ImageButton ID="InsertButton" ImageUrl="Images/icons/add24.png" ToolTip="Add" runat="server" CommandName="Insert" /> <asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/clear24.png" ToolTip="Cancel" runat="server" CommandName="Cancel" /> </td> <%--<td> &nbsp;</td>--%> <td> <asp:TextBox ID="AnswerTextBox" runat="server" Text='<%# Bind("Answer") %>'/> </td> </tr> </InsertItemTemplate> <ItemTemplate> <tr style=""> <td> <asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /> <asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /> </td> <%--<td> <asp:Label ID="AnswerIDLabel" runat="server" Text='<%# Eval("AnswerID") %>' /> </td>--%> <td> <asp:Label ID="AnswerLabel" runat="server" Text='<%# Eval("Answer") %>' /> </td> </tr> </ItemTemplate> <LayoutTemplate> <div ><table id="thetable" width="97%" cellpadding="0px" cellspacing="0px" style="margin:0px 0px 0px 0px; border:2px solid #003366; font-size:13px; font-weight:bold;"> <thead> <tr style="background-color:#C6D7B5;"> <th style="border-bottom:2px solid #003366; ">...</th> <th style="border-bottom:2px solid #003366; ">Answer</th> </tr> </thead> <tbody><tr id="itemPlaceholder" runat="server"></tr></tbody> </table></div> </LayoutTemplate> <SelectedItemTemplate> <tr style=""> <td> <asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" /> <asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" /> </td> <td> <asp:Label ID="AnswerLabel" runat="server" Text='<%# Eval("Answer") %>' /> </td> </tr> </SelectedItemTemplate> </asp:ListView> </div> <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:QuizSysDBConnectionString %>" SelectCommand="SELECT [Answers].* FROM [Answers] INNER JOIN [QuizContent] ON [QuizContent].QuestionID = @QuestionID" DeleteCommand="DELETE FROM [Answers] WHERE [AnswerID] = @AnswerID" InsertCommand="INSERT INTO [Answers] ([Answer]) VALUES (@Answer)" UpdateCommand="UPDATE [Answers] SET [Answer] = @Answer WHERE [AnswerID] = @AnswerID"> <DeleteParameters> <asp:Parameter Name="AnswerID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Answer" Type="String" /> <asp:ControlParameter ControlID="ListView2" Name="QuestionID" PropertyName="SelectedValue" Type="Int32" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="Answer" Type="String" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="ListView2" Name="QuestionID" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> **NOTE:** I don't have any code-behind. And again the problem is as following: when I run the code, I will see the three ListView controls. It should show only one of them. And when the user selects one of the rows, the second ListView will be displayed and so on for the third ListView.
0
[ 2, 184, 20, 233, 48, 153, 968, 4725, 6115, 13, 5, 3762, 3426, 6, 75, 20764, 21, 3131, 19, 14, 64, 968, 4725, 60, 800, 3726, 3726, 31, 589, 21, 78, 28, 306, 9, 2328, 10058, 17, 31, 57, 20, 1600, 21, 17667, 1406, 3010, 9, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
majority vote algorithm in Weka.classifiers.meta.vote === **What is the majority vote algorithm used in Weka. I tried to figure out its code but could not understand it.**
0
[ 2, 1698, 2018, 9083, 19, 95, 657, 9, 1898, 16292, 18, 9, 5909, 58, 9, 28195, 800, 3726, 3726, 13, 1409, 608, 25, 14, 1698, 2018, 9083, 147, 19, 95, 657, 9, 31, 794, 20, 1465, 70, 82, 1797, 47, 110, 52, 1369, 32, 9, 1409, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Black background behind any CCLabelBMFont === I'm trying to render fnt fonts using the CCLabelBMFont class. The fnt has a PNG associated, with a transparent background. The problem is that when I try to render any text, it always contains a black background, this black color is not in the PNG, and I can't find the way to remove it. Any idea? Thanks.
0
[ 2, 319, 2395, 439, 186, 8093, 21018, 13178, 21931, 800, 3726, 3726, 31, 22, 79, 749, 20, 16535, 398, 2877, 9978, 18, 568, 14, 8093, 21018, 13178, 21931, 718, 9, 14, 398, 2877, 63, 21, 351, 2723, 1598, 15, 29, 21, 14862, 2395, 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...
want to play an audio only once when user tap on option menu item === i want to play an audio only once when clicked on option menu item. When user next time tap on the same item the audio will be stop i think on that but can't find any solution help me to resolve my problem. here is my code. when user alternately tap on the item the audio will play and stop alternately. public boolean onCreateOptionsMenu(Menu menu) { // TODO Auto-generated method stub MenuInflater menuInflater= getMenuInflater(); menuInflater.inflate(R.menu.menu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId()== R.id.item1) { Intent intent = new Intent(AthravaShirshaActivity.this, EnglishExpln.class); startActivity(intent); } if(item.getItemId()== R.id.item2) { MediaPlayer mp= MediaPlayer.create(AthravaShirshaActivity.this, R.raw.mantra); mp.start(); mp.setLooping(false); mp.setOnCompletionListener(new OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { mp.stop(); } }); item.setIcon(android.R.drawable.ic_media_pause); } return true; }
0
[ 2, 259, 20, 418, 40, 4023, 104, 382, 76, 4155, 5526, 27, 4255, 11379, 9101, 800, 3726, 3726, 31, 259, 20, 418, 40, 4023, 104, 382, 76, 15802, 27, 4255, 11379, 9101, 9, 76, 4155, 328, 85, 5526, 27, 14, 205, 9101, 14, 4023, 129, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 event updates in Google Fusion Table === I am creating an application that uses the Google Maps api and I have it working. Currently, is runs in a browser from the desktop. I would like for another person, with a map open, to be able to see everything the first person has put on their map. I know how to create a layer from a Fusion Table and have it show. I am stuck when I try and authorize through the oauth 2.0 protocol. I have tried two ways and can't get them wprking. I would like to keep the application running from the desktop in the browser because I would rather not build a website for it. 1) Used [gwt-oauth][1] approach In my Google API Console, I registered my API as a web application. My JavaScript Origin is [https://localhost][2]. My Redirect URI is [https://localhost/oauthWindow.html/][3]. When I try this route, I get the following message.![enter image description here][4] So I tried to add that file path into my API Console but it will not accept a file path that is c:/.... 2) Use an installed application approach Because my application is not running online, I figured to try and use an installed application approach. i know the redirect URI urn:ietf:wg:oauth:2.0:oob will give back the information in the address bar. I have looked and can not find much on using this approach. A response helping with either approach would be greatly appreciated. Let me know if you need more information. [1]: http://code.google.com/p/gwt-oauth2/source/browse/trunk/samples/script/ScriptSample.html [2]: http:// [3]: http:// [4]: http://i.stack.imgur.com/io6hf.jpg
0
[ 2, 8144, 6867, 807, 16779, 19, 8144, 11117, 859, 800, 3726, 3726, 31, 589, 2936, 40, 3010, 30, 2027, 14, 8144, 6867, 21, 2159, 17, 31, 57, 32, 638, 9, 871, 15, 25, 1461, 19, 21, 16495, 37, 14, 17404, 9, 31, 83, 101, 26, 226, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 3 destroy oldest item in database if user owns more than 10 === I have an Activity stream I have designed using STI in rails 3. I want to do a check to see if a user has more than 10 activity items on create. When a user creates his 11th Activity in the database, I want it to destroy the oldest record * essentially the first record the user made and so on.* This way I am keeping my database clean of thousands of old useless records. I am assuming I would start at the model level, but since I dont want to define the "current_user" in the model, it should be in the controller. Any help would be appreciated to accomplish this task, I am fairly new at these type of more advanced tasks in rails.
0
[ 2, 2240, 18, 203, 4407, 2976, 9101, 19, 6018, 100, 4155, 258, 18, 91, 119, 332, 800, 3726, 3726, 31, 57, 40, 2358, 3766, 31, 57, 1006, 568, 13, 5509, 19, 2240, 18, 203, 9, 31, 259, 20, 107, 21, 2631, 20, 196, 100, 21, 4155, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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: Modify form value before validation === I have the following situation (example): - a form field type date - a vaiidation pattern 'dd.mm.YYY' - a helper object that turns '12' into '12.07.2012' or '2.5' into '02.05.2012' Where and when do I make this call? When I put it into the entity it gets changed, but when reloading the form (because of an error or something) the old value and not the corrected value is shown. Actually this would be the best place to put it, but how do I tell the form, that the value has changed from within the entity? Or is there another way of doing this, between those for example? $form->bindRequest($request); // do some fancy stuff if ($form->isValid())
0
[ 2, 13, 7261, 10229, 93, 135, 45, 17579, 505, 1923, 115, 27999, 800, 3726, 3726, 31, 57, 14, 249, 1858, 13, 5, 29041, 6, 45, 13, 8, 21, 505, 575, 1001, 1231, 13, 8, 21, 17136, 1340, 857, 3732, 13, 22, 8096, 9, 3363, 9, 93, 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...
Php regex to remove duplicated words === I have string: $s = 'Артгалерея Живопись Африка и от the Albert$Lizah, L-77, Christ UF1.1 (Christ).'; I wish to receive in a array the next string: $s = 'Артгалерея Живопись Африка Albert Lizah Christ'; I used regex: preg_match_all('#\pL{4,}+#iu', $s, $m); $m = preg_replace("/\b(\w+)\s+\\1\b/i", "$1", implode(' ',$m[0])); $m = explode(' ', $m); echo '<pre>'.print_r($m, 1).'</pre>'; And received: $s = 'Артгалерея Живопись Африка Albert Lizah Christ Christ'; But I can not receive a string without duplicating words. **Question**: How to change regular expression php - '#\pL{4,}+#iu', to exclude inclusion in a string of duplicating words? Thank you very math!
0
[ 2, 13, 26120, 7953, 1706, 20, 4681, 19429, 43, 715, 800, 3726, 3726, 31, 57, 3724, 45, 5579, 18, 800, 13, 22, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 2953, 4403, 1210, 17926, 15, 644, 8, 4536, 15, 2581, 13, 5532, 165, 9, 165, 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...
Business Listing Information API === I am trying to find a API for querying business information based on {street_address, city, state, zip, etc} or {lat, long} and business type (restaurant, bar, lodging, shopping, golf, etc). I would like to be able to retrieve information such as business URL, phone number, and any other related information. I have checked out Google's APIs, and it seems as though most of the useful APIs have been depricated and restricted to the point it is not a viable option. Anyone know of any viable options? Thanks
0
[ 2, 508, 9554, 676, 21, 2159, 800, 3726, 3726, 31, 589, 749, 20, 477, 21, 21, 2159, 26, 25597, 68, 508, 676, 432, 27, 13, 1, 13376, 1, 27950, 15, 136, 15, 146, 15, 12133, 15, 2722, 1, 54, 13, 1, 8927, 15, 175, 1, 17, 508, 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...
Postgresql fails to be recognised on the correct path === I'm trying to setup a new app with postgresql so I can deploy with Heroku. However, when I run the app using 'rails server' my welcome to rails screen gives this error: > PG::Error > > could not connect to server: Permission denied Is the server running > locally and accepting connections on Unix domain socket > "/var/pgsql_socket/.s.PGSQL.5432"? I'm sure this is the same issue as is covered here: [http://stackoverflow.com/questions/6770649/repairing-postgresql-after-upgrading-to-osx-10-7-lion][1] But the fix by John Wang doesn't work. I've tried adding 'export PATH=/usr/local/bin:$PATH' to the .bash_profile, .bashrc and .zshrc, none of which change the outcome. Calling which psql always returns /usr/bin/psql. What am I doing wrong here? Any help would be much appreciated! [1]: http://stackoverflow.com/questions/6770649/repairing-postgresql-after-upgrading-to-osx-10-7-lion
0
[ 2, 678, 6879, 18, 22402, 13614, 20, 44, 7163, 27, 14, 4456, 2013, 800, 3726, 3726, 31, 22, 79, 749, 20, 18161, 21, 78, 4865, 29, 678, 6879, 18, 22402, 86, 31, 92, 17617, 29, 36, 9266, 9, 207, 15, 76, 31, 485, 14, 4865, 568, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 save the required pixel from an image and draw the image using that pixels === Hi all I have written a sample code to find out the black color pixels from an image, now I would like to save all those pixels to an array and would like to save that particular image with the save pixels can some one help me Assume my image that I am getting the pixels is as follows ![enter image description here][1] [1]: http://i.stack.imgur.com/S2fNv.jpg I will read all the black pixels and would like to save them, from that I would like to re-image the `Fallout` with transparent background. This is what I have written for (int i = 0; i < b.Width; i++) { for (int j = 0; j < b.Height; j++) { Color pixelColor = b.GetPixel(i, j); Response.Write("The color is " + pixelColor); if (pixelColor.ToArgb() == Color.Black.ToArgb()) { //Will get black color here } } } Can some one help me out for the remaining.
0
[ 2, 184, 92, 31, 2079, 14, 1390, 18146, 37, 40, 1961, 17, 2003, 14, 1961, 568, 30, 18146, 18, 800, 3726, 3726, 4148, 65, 31, 57, 642, 21, 5717, 1797, 20, 477, 70, 14, 319, 1665, 18146, 18, 37, 40, 1961, 15, 130, 31, 83, 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...
unable to set values taken from text fields from a UIViewController to another class for calculation === I am having problems unable to set values taken from UItextfields from a Viewcontroller to another class which does the calculations from those values. @interface InitialViewController : UIViewController @property (weak, nonatomic) IBOutlet UITextField *phValue; @property (weak, nonatomic) IBOutlet UITextField *pco2Value; @property (weak, nonatomic) IBOutlet UITextField *hco3Value; @property (weak, nonatomic) IBOutlet UITextField *sodiumValue; @property (weak, nonatomic) IBOutlet UITextField *chlorideValue; - (IBAction)analyseValues:(UIButton *)sender; @property (nonatomic,retain)NSDecimalNumber* ph; @property (nonatomic,retain) NSDecimalNumber* pco2; @property (nonatomic,retain)NSDecimalNumber* hco3; @property (nonatomic,retain)NSDecimalNumber* sodium; @property(nonatomic,retain)NSDecimalNumber* chloride; @end in the implementation -(void)values{ [self setPh:[[NSDecimalNumber alloc] initWithFloat:phValue.text.floatValue ]]; [self setPco2:[[NSDecimalNumber alloc] initWithFloat:pco2Value.text.floatValue]]; [self setHco3:[[NSDecimalNumber alloc ] initWithFloat:hco3Value.text.floatValue]]; [self setSodium:[[NSDecimalNumber alloc] initWithFloat:sodiumValue.text.floatValue] ]; [self setChloride:[[NSDecimalNumber alloc] initWithFloat:chlorideValue.text.floatValue] ]; } - (void)viewDidLoad { [super viewDidLoad]; [self values];} Then I have another class which takes these values ,but on running the program it runs but does assign values taken from the initialViewController. #import <Foundation/Foundation.h> #import "InitialViewController.h" @interface AcidBaseCalculations : NSObject @property (nonatomic) float ph; @property (nonatomic) float pco2; @property (nonatomic) float chloride; @property (nonatomic) float sodium; @property (nonatomic) float hco3; @implementation AcidBaseCalculations @synthesize ph,pco2,chloride,hco3,sodium; -(void)calculations{ InitialViewController *bvc = [[InitialViewController alloc] init]; ph = bvc.ph.floatValue ; pco2 = bvc.pco2.floatValue; // these values are not being set although the program runs successfully hco3 = bvc.hco3.floatValue; sodium = bvc.sodium.floatValue; chloride = bvc.chloride.floatValue; I want to use these new values here and perform some logical operations in this class.
0
[ 2, 2343, 20, 309, 4070, 658, 37, 1854, 2861, 37, 21, 13, 5661, 4725, 12898, 1252, 20, 226, 718, 26, 19644, 800, 3726, 3726, 31, 589, 452, 1716, 2343, 20, 309, 4070, 658, 37, 13, 5661, 11969, 1109, 18, 37, 21, 1418, 12898, 1252, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
create tableview like facebook timeline... iPhone app === i want to create app like facebook timeline, so want to knwo that do anyone know how to create tableview like facebook timeline, that it loads cell limited number of cell at once and automatically when we move to bottom of timeline ? i want to create lazy loading tableview that automatically load new cells when user goes to the bottom of tableview. please help me, thanks in advance.
1
[ 2, 1600, 859, 4725, 101, 9090, 18398, 9, 9, 9, 21024, 4865, 800, 3726, 3726, 31, 259, 20, 1600, 4865, 101, 9090, 18398, 15, 86, 259, 20, 6209, 6374, 30, 107, 1276, 143, 184, 20, 1600, 859, 4725, 101, 9090, 18398, 15, 30, 32, 190...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Redirecting StdIn and StdOut not working === I'm trying to write a GUI wrapper around an interactive console executable, but can't get the Process.StartInfo.RedirectStandardOutput and Process.StartInfo.RedirectStandardInput to work. Not sure if this has to do with the fact that the console app is interactive, i.e. prompts and then expects input, and then prompts again, etc. Is there any way to achieve my goal other than using this method? Here's my code void Work(string filePath) { // Setup process Process cmdProcess = new Process(); cmdProcess.StartInfo.FileName = filePath; cmdProcess.StartInfo.UseShellExecute = false; cmdProcess.StartInfo.RedirectStandardInput = true; cmdProcess.StartInfo.RedirectStandardOutput = true; cmdProcess.StartInfo.RedirectStandardError = true; // Attach events cmdProcess.OutputDataReceived += new DataReceivedEventHandler(WorkOutput_DataReceived); cmdProcess.ErrorDataReceived += new DataReceivedEventHandler(WorkError_DataReceived); // Start process cmdProcess.Start(); cmdProcess.BeginOutputReadLine(); cmdProcess.BeginErrorReadLine(); } void WorkError_DataReceived(object sender, DataReceivedEventArgs e) { // Show output textBox2.Text += e.Data; } void WorkOutput_DataReceived(object sender, DataReceivedEventArgs e) { // Show output textBox2.Text += e.Data; }
0
[ 2, 302, 14706, 68, 354, 3653, 17, 354, 43, 1320, 52, 638, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 21, 9457, 28051, 140, 40, 9194, 8650, 1396, 17194, 5924, 15, 47, 92, 22, 38, 164, 14, 953, 9, 13680, 108, 4120, 9, 99, 14706...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
bash: how to extract pattern from string === In bash script, what is the easy way to extract a text pattern from a string? For example, I want to extract "X" followed by 2 digits in the end of the string?
0
[ 2, 13158, 45, 184, 20, 10962, 3732, 37, 3724, 800, 3726, 3726, 19, 13158, 3884, 15, 98, 25, 14, 2010, 161, 20, 10962, 21, 1854, 3732, 37, 21, 3724, 60, 26, 823, 15, 31, 259, 20, 10962, 13, 7, 396, 7, 709, 34, 172, 19076, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
setting layout params after animation === i have 2 views in a `RelativeLayout` like this: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <View android:id="@+id/view1" android:layout_width="match_parent" android:layout_height="200dp" android:background="@drawable/shape_red"/> <View android:id="@+id/view2" android:layout_width="match_parent" android:layout_height="50dp" android:layout_below="@id/view1" android:background="@drawable/shape_blue"/> </RelativeLayout> now, i animate the y property of `view1` from 0 to 300. but i want `view2` to change its position according to `view1` - because `view2` is set to be below (layout-below) `view1`. as this isn't working, i tried to add an `onAnimationEnd` listener to the animation. like this: ObjectAnimator ani = ObjectAnimator.ofFloat(view1, "Y", 200); ani.setDuration(2000); ani.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, view2.getHeight()); params.addRule(RelativeLayout.BELOW, view1.getId()); view2.setLayoutParams(params); } }); but `view2` didn't change its position at all. i would like to avoid making a new animation for `view2` if possible, so please don't bother to suggest one. ;) does anyone have some suggestions?
0
[ 2, 2697, 9106, 2258, 79, 18, 75, 6236, 800, 3726, 3726, 31, 57, 172, 4146, 19, 21, 13, 1, 7256, 3366, 4414, 1320, 1, 101, 48, 45, 13, 1, 60, 396, 8184, 615, 3726, 7, 165, 9, 387, 7, 19608, 3726, 7, 1982, 410, 8, 457, 7, 60...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
cudaThreadSynchronize when calling two kernels in a row === I'm having a problem with calling two kernels in every loop. This is the loop code: cudaMemcpy(frame_in_gpu,frame_in.data, W*H*3*sizeof(uchar),cudaMemcpyHostToDevice); cudaThreadSynchronize(); cuda_grayscale(frame_in_gpu, frame_out_gpu, W, H,dimGrid,dimBlock); cudaThreadSynchronize(); cuda_edge_x(frame_out_gpu,frame_x_gpu,W,H,dimGrid,dimBlock); cudaThreadSynchronize(); cudaMemcpy(frame_e.data, frame_x_gpu, W*H*sizeof(uchar),cudaMemcpyDeviceToHost); cudaThreadSynchronize(); Each on of these functions only calls a kernel with the same inputs as the function using dimGrid and dimBlock. frame_in.data is RGB image first it turns it to a gray scale and then finds its edges. I have set 'frame_e' before the loop starts and I'm getting the same thing after each iteration finishes. I read the output of the first kernel call and it is invalid. But if I comment out the second kernel call it becomes valid. What am I missing?
0
[ 2, 22068, 8383, 10647, 16023, 2952, 76, 2555, 81, 17007, 18, 19, 21, 3131, 800, 3726, 3726, 31, 22, 79, 452, 21, 1448, 29, 2555, 81, 17007, 18, 19, 352, 5293, 9, 48, 25, 14, 5293, 1797, 45, 3141, 23021, 4829, 6448, 5, 8361, 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...
Effectively sorting objects in an array using multiple NSSortDesciptors === I have an array of dictionaries. Each dictionary holds data about an individual audio track. My app uses a star rating system so users can rate track 1-5 stars. Each dictionary has its own rating data per track, as follows: - `avgRating` (ex: 4.6) - `rating_5_count` (integer representing how many 5-star ratings a track received) - `rating_4_count` - `rating_3_count` - `rating_2_count` - `rating_1_count` I'm trying to create a Top Charts table in my app. I'm creating a new array with objects sorted by `avgRating`. I understand how to sort the objects using `NSSortDescriptors`, but here is where I'm running into trouble... If I only use `avgRating` as a sort descriptor, then if a track only receives one 5-star rating, it will jump to the top of the charts and beat out a track that might have a 4.9 with hundreds of votes. I could set a minimum vote count to prevent this in the Top Charts array, but I would rather not do this. I would then have to change the min vote count as I get more users. This is a bit subjective, but does anyone have any other suggestions on how to effectively do sort the array?
0
[ 2, 5463, 2058, 68, 3916, 19, 40, 7718, 568, 1886, 13, 2172, 22843, 3196, 11526, 10778, 800, 3726, 3726, 31, 57, 40, 7718, 16, 29783, 9, 206, 9186, 2763, 1054, 88, 40, 1359, 4023, 792, 9, 51, 4865, 2027, 21, 778, 4647, 329, 86, 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...
How do I get Twitter4J to stream posts with a certain hashtag? === When I search for a given hashtag, I get the results for recent tweets containing that hashtag. This is what I want to stream, So if any new tweets with this hashtag are made I will know.
0
[ 2, 184, 107, 31, 164, 10623, 300, 728, 20, 3766, 9868, 29, 21, 1200, 19170, 8628, 60, 800, 3726, 3726, 76, 31, 2122, 26, 21, 504, 19170, 8628, 15, 31, 164, 14, 1736, 26, 1764, 20224, 18, 3503, 30, 19170, 8628, 9, 48, 25, 98, 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...
How i feed my form data into zoho invoice estimate? === How i insert my form data values into Zoho invoice estimate page using php with zoho api key
1
[ 2, 184, 31, 4063, 51, 505, 1054, 77, 9017, 1807, 19, 13379, 10243, 60, 800, 3726, 3726, 184, 31, 14692, 51, 505, 1054, 4070, 77, 9017, 1807, 19, 13379, 10243, 2478, 568, 13, 26120, 29, 9017, 1807, 21, 2159, 1246, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do i make this rss feed validate? === I was using this to generate RSS to post to my facebook wall... but in the last 24 hours it stopped working. I think that the feed pushing service i use became strict with the RSS validation. This doesnt validate... and i cant get it too. Can anyone suggest changes to make this work? I know this probably looks VERY messy! :os Thanks in advance. Danny <?php do { ?> <item> <title><![CDATA[<?php echo htmlentities(strip_tags(addslashes($row_getDresses['listing_title']))); ?><?php if($_GET['type'] == "reduced-dresses"){?> (REDUCED BY <?php echo $row_getDresses['symbol'];?><?php echo $row_getDresses['reduced_price'];?> <?php echo $row_getDresses['dress_currency'];?>)<?php } else {?> (<?php echo $row_getDresses['symbol'];?><?php echo $row_getDresses['price'];?> <?php echo $row_getDresses['dress_currency'];?>)<?php }?>]]></title> <link><![CDATA[http://www.asite.com/dress/<?php echo $row_getDresses['listing_tidy_url'];?>-<?php echo $row_getDresses['dress_id'];?>.html]]></link> <description><![CDATA[<?php echo substr(strip_tags(addslashes(trim($row_getDresses['dress_desc'])),'ENT_QUOTES'),0,100);?>]]>...</description> <?php if (isset($row_getDresses['main_image']) && file_exists("../listing-images/".$row_getDresses['main_image']."")) { ?> <enclosure url="http://www.asite.com/listing-images/<?php echo $row_getDresses['main_image'];?>" length="<?php echo filesize("../listing-images/".$row_getDresses['main_image']."");?>" type="image/jpeg"> <?php }?> <?php if ($_GET['type'] == "reduced-dresses"){?> <pubDate><?php echo $row_getDresses['date_updated'];?> GMT</pubDate> <?php } else { ?> <pubDate><?php echo $row_getDresses['date_added'];?> GMT</pubDate> <?php }?> <category><?php echo htmlentities($pageTitle);?></category> </item> <?php } while ($row_getDresses = mysql_fetch_assoc($getDresses)); ?>
0
[ 2, 184, 107, 31, 233, 48, 13, 1224, 18, 4063, 7394, 1373, 60, 800, 3726, 3726, 31, 23, 568, 48, 20, 7920, 13, 1224, 18, 20, 678, 20, 51, 9090, 769, 9, 9, 9, 47, 19, 14, 236, 937, 974, 32, 1175, 638, 9, 31, 277, 30, 14, 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...
How to avoid Menu items having navigate Url property with # === I'm binding some items to a menu. Assuming, my site address is "www.abc.com/Dev", the menu items automatically get the navigateUrl of "www.abc.com/Dev/#". Now, these menu items when clicked open some applications like 'Notepad'. Because of the navigateUrl property of these menu items, if I right click on the items, it gives me a context menu and if I click on 'Open in New Window', it takes me back to my original site. Ideally, this is the wrong behaviour. Is there some way I can prevent the setting of the navigateUrl? I tried making: menuItem.NavigateUrl = null But once the menuItems are initialized, they have the navigateUrl property set with #. Is there any way I can prevent this.
0
[ 2, 184, 20, 2658, 11379, 3755, 452, 20782, 287, 6362, 1354, 29, 6926, 800, 3726, 3726, 31, 22, 79, 8728, 109, 3755, 20, 21, 11379, 9, 11704, 15, 51, 689, 3218, 25, 13, 7, 6483, 9, 21880, 9, 960, 118, 14438, 7, 15, 14, 11379, 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...
CodeIgniter RESTful API Library Response === This question is related to the CodeIGniter RESTful API library found here. I hope someone here is using this library and can offer some help :) . http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/ I have installed this library and set up a working environment with it. I have been able to get data back as well. For use, I have created a very simple class that I am accessing with the following code: <?php require APPPATH.'/libraries/REST_Controller.php'; class Users extends REST_Controller { public function list_get() { $this->load->database(); $data = $this->db->get('users')->result(); $this->response($data, 200); } } To get at this controller, I have done a call to the following URL: "http://localhost/mgtapp/index.php/api/users/list/format/json" While I am getting back data, I see that the header content type is set to text/html instead of json and I am also getting errors in php that say "headers already sent". I have tried to remove the format from the end of the url and send it in via an "accept" but I get the same errors and I see the content type being set as text/html. When I run the example, I see the response coming back as it should (as json in the content type) so I do not understand what I am doing wrong here that the content type is not being set correctly. IF someone can shed some light it would be super helpful! Thanks!
0
[ 2, 1797, 9693, 242, 106, 760, 1566, 21, 2159, 1248, 1627, 800, 3726, 3726, 48, 1301, 25, 1597, 20, 14, 1797, 9693, 242, 106, 760, 1566, 21, 2159, 1248, 216, 235, 9, 31, 1376, 737, 235, 25, 568, 48, 1248, 17, 92, 1994, 109, 448, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Detect Missing Line in a Txt File === Let us say a txt file consists of these lines: A 1 2 3 B 1 2 3 C 1 3 Clearly, 2 is missing from C in the txt file. What is the idea to detect the missing 2 and output it? I need to read the txt file line by line. Thank you !
0
[ 2, 20059, 9092, 2863, 293, 19, 21, 20225, 38, 3893, 800, 3726, 3726, 408, 182, 395, 21, 20225, 38, 3893, 2043, 16, 158, 1560, 45, 21, 137, 172, 203, 334, 137, 172, 203, 272, 137, 203, 2885, 15, 172, 25, 2863, 37, 272, 19, 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...
change cell content view when custome view added to cell === I have created one uiviewcontroller with xib to adding in the uitableview cell. here is the code for that. @interface CustomeCellHome : UIViewController{ IBOutlet UIImageView *imgViewBack; // will have number of labels and imageviews. } @property (nonatomic, retain) UIImageView *imgViewBack; @implementation CustomeCellHome @synthesize imgViewBack; all this IBOutlet connected to xib. now i am adding this to my uitableview cell. here is code for that. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 150; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; // if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; // } CustomeCellHome *objCell = [[CustomeCellHome alloc] init]; [objCell.view setTag:indexPath.row]; [cell.contentView addSubview:objCell.view]; objCell.imgViewBack.image = [UIImage imageNamed:@"unsel.png"]; [objCell release]; return cell; } now i want to change this imgViewBack image on selection of row. here is code for that. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; CustomeCellHome *objCCell; objCCell.view = [cell viewWithTag:indexPath.row]; objCCell.imgViewBack.image = [UIImage imageNamed:@"sel.png"]; } but application is getting crashed at this line objCCell.view = [cell viewWithTag:indexPath.row]; don't getting what is wrong with this. any suggestion for that ? any suggestion will be appreciated .
0
[ 2, 753, 1667, 2331, 1418, 76, 5816, 62, 1418, 905, 20, 1667, 800, 3726, 3726, 31, 57, 679, 53, 13, 5661, 4725, 12898, 1252, 29, 5641, 220, 20, 4721, 19, 14, 13, 11193, 579, 4725, 1667, 9, 235, 25, 14, 1797, 26, 30, 9, 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...
js : how i can extend basic Array implementation in ie7? === I have a problem with extending basic Array implementation in IE7 function extend(Child, Parent){ var F = function() { }; F.prototype = Parent.prototype; Child.prototype = new F(); Child.prototype.constructor = Child; Child.superclass = Parent.prototype } var MyArray = function(){}; extend(MyArray, Array); var a = new MyArray(); a.push("value"); console.log(a.length); in all browsers a.length == 1, but in ie7 a.length == 0 please help to resolve this problem
0
[ 2, 487, 18, 13, 45, 184, 31, 92, 7206, 2125, 7718, 6123, 19, 13, 660, 465, 60, 800, 3726, 3726, 31, 57, 21, 1448, 29, 8176, 2125, 7718, 6123, 19, 13, 660, 465, 1990, 7206, 5, 11287, 15, 4766, 6, 1, 4033, 398, 800, 1990, 5, 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...
Show EditText B when EditText A has letters === All- I am trying to hide EditText B,C until EditText A has at least one character in it. I have tried using a textwatcher... EditText editText = (EditText) findViewById(R.id.p1); //A final EditText editText$ = (EditText) findViewById(R.id.p1$); //B final TextView $ = (TextView) findViewById(R.id.$); //C editText$.setVisibility(View.INVISIBLE); $.setVisibility(View.INVISIBLE); editText.addTextChangedListener(new TextWatcher(){ public void afterTextChanged(Editable arg0) { } public void beforeTextChanged(CharSequence s, int start, int count, int after) { } public void onTextChanged(CharSequence s, int start, int before, int count) { if (s.toString() != "" ) { editText$.setVisibility(View.VISIBLE); $.setVisibility(View.VISIBLE); } else { editText$.setVisibility(View.INVISIBLE); $.setVisibility(View.INVISIBLE); } } }); but EditText B (and C) are either always visible or never visible depending on weather or not I declare `editText$.setVisibility(View.INVISIBLE); $.setVisibility(View.INVISIBLE);` before the TextWatcher. Can someone tell me what I am doing wrong? Thank you for your time!
0
[ 2, 298, 9392, 11969, 334, 76, 9392, 11969, 21, 63, 2516, 800, 3726, 3726, 65, 8, 31, 589, 749, 20, 3077, 9392, 11969, 334, 15, 150, 163, 9392, 11969, 21, 63, 35, 639, 53, 925, 19, 32, 9, 31, 57, 794, 568, 21, 1854, 9054, 106, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Modified Binary Search Tree for Sorting? === I have to sort an array. Apart from the already existing types of sorting that exists, I was wondering if an algorithm like this would work out, and what its complexity might be. I have an array to be sorted. I create a Binary Search Tree. So if I insert all the elements of the array into the BST, and then assign them back to the array one by one when doing a pre-order traversal of the tree, I will achieve a sorted result. (Though consuming more space complexity because of the tree nodes. Not in-place sorting.) int i=0; void sort_by_preorder(node *n) { if(n==NULL) { return; } sort_by_preorder(n->leftchild); array[i++]=n->data; sort_by_preorder(n->rightchild); } I know a BST does not allow duplicate insertions, so maybe we could consider modifying the BST insertion algorithm into <= for the left sub-tree, or maybe >= for the right sub-tree. Will this be a good implementation (workable)? What would be the complexity? Traversal complexity is on an average `O(n)`. And insertion is just `O(log n)`. So this should, according to me, turn out to be an efficient algorithm (though I'm not great at evaluating complexities). Thanks.
0
[ 2, 5372, 14171, 2122, 1541, 26, 2058, 68, 60, 800, 3726, 3726, 31, 57, 20, 2058, 40, 7718, 9, 2629, 37, 14, 614, 3149, 2551, 16, 2058, 68, 30, 5636, 15, 31, 23, 5712, 100, 40, 9083, 101, 48, 83, 170, 70, 15, 17, 98, 82, 1274...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Xcode crashes trying to launch app in iOS Simulator (after adding splash screen to target) === I'm fairly new to iOS programming, playing around with a small app for iPhone/iPad. I ran into some trouble after adding a splash screen image to the project. After doing this, Xcode (4.3.3) can no longer launch the app in the simulator without crashing. It works fine launching it on a separate device. Any ideas why this is happening or what I can do to fix it?
0
[ 2, 993, 9375, 21563, 749, 20, 3394, 4865, 19, 13, 7760, 24565, 13, 5, 5162, 4721, 13873, 2324, 20, 2935, 6, 800, 3726, 3726, 31, 22, 79, 6647, 78, 20, 13, 7760, 3143, 15, 791, 140, 29, 21, 284, 4865, 26, 21024, 118, 49, 8240, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 get item value from ArrayList in an Object === I am trying to process XML plist data from an API, but am hitting lots of walls! The data is Apple plist format, which I am parsing using Akos' code from [this link][1] which seems to work perfectly. It is parsing as String, Object into a HashMap. I am able to get the value of a given key ie. Object childItems = items.mPlistHashMap.get("childItems"); System.out.println(childItems.getClass()); System.out.println(childItems); childItems.getClass() shows as - *class java.util.ArrayList* The LogCat output for childItems shows - **[{remoteFilePath=/Picture.png, host=www.host.com, ratingCount=1, targetId=82, commentCount=1, externalId=/demo.host.com/Private/Picture.png, fileSize=23738, entity_name=Item, memberAccessLevel=0, leaderAccessLevel=0, name=Picture.png, target=SystemUser, ownerAccessLevel=3, tagCount=1}, {lastName=Test, entity_name=User, username=Test, host=www.host.com, userId=82, firstName=Test, password=TestPwd, loginName=Test}, {typeId=0, entity_name=UserType, name=UserType_Teacher}]** I presume that I can then work with this ArrayList, but this is where I am coming undone. For instance I want to get the remoteFilePath value, and display this in a ListView (already working for local files). The example childItems list above only contain one file (Picture.png), but this list could contain any number of files, so I would need to iterate the list and get any values for remoteFilePath to display. Any help appreciated, I just don't know how to "bore down" into this list, or if the childItems object needs to be cast to a new Array or so on. If I'm missing any vital information, ask and I shall provide :) [1]: http://stackoverflow.com/questions/3904418/apple-plist-form-of-xml-can-i-parse-it-through-android-java
0
[ 2, 184, 20, 164, 9101, 1923, 37, 7718, 5739, 19, 40, 3095, 800, 3726, 3726, 31, 589, 749, 20, 953, 23504, 351, 5739, 1054, 37, 40, 21, 2159, 15, 47, 589, 6687, 7503, 16, 2021, 187, 14, 1054, 25, 4037, 351, 5739, 2595, 15, 56, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 find out in which element the item is placed after drag and drop in WPF === How can i know in which element drag and drop element is placed. For example i am having 3 buttons namely Button1, Button2, Button3. Drag a treeview item and drop it into one of the 3 button. How can i findout in which button it is placed?
0
[ 2, 184, 20, 477, 70, 19, 56, 4520, 14, 9101, 25, 1037, 75, 5501, 17, 2804, 19, 619, 7721, 800, 3726, 3726, 184, 92, 31, 143, 19, 56, 4520, 5501, 17, 2804, 4520, 25, 1037, 9, 26, 823, 31, 589, 452, 203, 12861, 8525, 5167, 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...
Key presses cause the text to be cleared === I'm using the (text) soft keyboard and pressing some keys, and I noticed there are keys, such as "*" and ":", that when pressed cause the text to be cleared, even though they are standard keys (as the examples I gave). Can somebody please explain me what the reason for this is? Thanks.
0
[ 2, 1246, 16527, 1679, 14, 1854, 20, 44, 4895, 800, 3726, 3726, 31, 22, 79, 568, 14, 13, 5, 11969, 6, 1856, 8896, 17, 7196, 109, 5534, 15, 17, 31, 2711, 80, 50, 5534, 15, 145, 28, 13, 7, 2483, 7, 17, 13, 7, 45, 7, 15, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Clipboard copy action - whose file is the content? === I need to track copy-paste actions in Windows and Linux (I'm assuming gnome/unity) towards my app monitoring the clipboard content and **the originating file's location (path)** How can I accomplish this?
0
[ 2, 12229, 2806, 4344, 1028, 13, 8, 1196, 3893, 25, 14, 2331, 60, 800, 3726, 3726, 31, 376, 20, 792, 4344, 8, 19802, 62, 3078, 19, 1936, 17, 13024, 13, 5, 49, 22, 79, 11704, 24117, 118, 1020, 856, 6, 1016, 51, 4865, 8984, 14, 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...
Set focus by using keyboard in asp.net === I am creating a login page and want to give user the flexibility to control the focus by using keyboard. I am using AccessKey but it seems not working. Any help will be appreciated. Below is my HTML for Email field only. <tr> <td> <div class="loginLabel"> <span class="emailPasswordText"><u>E</u>mail</span> </div> <asp:TextBox ID="txtUserName" runat="server" TabIndex="1" CssClass="inputCredential" MaxLength="60" AccessKey="E"> </asp:TextBox> </td> </tr> I tried by using Alt+E and Ctrl+E in Mozilla Firefox.
0
[ 2, 309, 1776, 34, 568, 8896, 19, 28, 306, 9, 2328, 800, 3726, 3726, 31, 589, 2936, 21, 6738, 108, 2478, 17, 259, 20, 590, 4155, 14, 19401, 20, 569, 14, 1776, 34, 568, 8896, 9, 31, 589, 568, 1381, 4237, 47, 32, 2206, 52, 638, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 .toggle not completing === I have a function that is using the jQuery .toggle() to hide a div. The function get's called during 2 different scenarios. When the page loads the function get's called repeatedly to set up the page and then it gets called on a one off basis after user action. After the user action I can see that the div is getting updated correctly to include style="display:none;" but when the function get's called repeatedly during page load I can see the div only get's updated with the word style and the ="display:none;" is left out. The jquery I'm using is: $("#divAnswerUpdate" + qc_ID).toggle(); Any ideas why this might be happening?
0
[ 2, 487, 8190, 93, 13, 9, 262, 263, 4875, 52, 6869, 800, 3726, 3726, 31, 57, 21, 1990, 30, 25, 568, 14, 487, 8190, 93, 13, 9, 262, 263, 4875, 5, 6, 20, 3077, 21, 13, 12916, 9, 14, 1990, 164, 22, 18, 227, 112, 172, 421, 1961...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Preventing clicking of links using Javascript === $('a').click(function(e){return false;}); It successfully disables links almost everywhere but does not work on the links found in the tooltip-popups on the topic tags on this site (SO). I looked at the DOM and they are indeed `<a>` tags. How come? Is there a more robust way to force my user to stay on the current page? (This is for a bookmarklet where I graphically manipulate the DOM so I need to be able to click and drag everything, including links.) I know that even if I can disable the regular click functionality on all anchors it won't do anything for any navigation triggered by other click callbacks on other tags.
0
[ 2, 11520, 25590, 16, 6271, 568, 8247, 8741, 800, 3726, 3726, 5579, 5, 22, 58, 22, 6, 9, 150, 10129, 5, 22359, 5, 62, 6, 1, 24632, 4997, 73, 1, 6, 73, 32, 3673, 1460, 579, 18, 6271, 557, 6417, 47, 630, 52, 170, 27, 14, 6271, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 excel file in C# === Its my first experience with excel file using C#. As a demo, I wrote a single line in excel file and it worked but now I am trying to insert all the rows of DataTable but it gives the following error: *"HRESULT: 0x800A03EC"* Here is the code: for (int i = 0; i < table.Rows.Count; i++) { xlWorkSheet.Cells[i, 1] = table.Rows[i]["Ref"].ToString(); xlWorkSheet.Cells[i, 2] = table.Rows[i]["Name"].ToString(); } Please tell me how can I fix it?
0
[ 2, 2936, 20700, 3893, 19, 272, 5910, 800, 3726, 3726, 82, 51, 64, 1496, 29, 20700, 3893, 568, 272, 5910, 9, 28, 21, 8376, 15, 31, 738, 21, 345, 293, 19, 20700, 3893, 17, 32, 577, 47, 130, 31, 589, 749, 20, 14692, 65, 14, 11295...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Sharepoint re-order item order in the list === In the list, I set-up "ID" column and "Title" column. I added 10 items in the list, and I'm trying to put the 10th item between 1 and 2. After my research, many people said I can't manually change ID number... Is there a way to re-order the item? deleting every items is the only answer? Please help!
0
[ 2, 1891, 3132, 302, 8, 7861, 9101, 389, 19, 14, 968, 800, 3726, 3726, 19, 14, 968, 15, 31, 309, 8, 576, 13, 7, 1340, 7, 4698, 17, 13, 7, 22235, 7, 4698, 9, 31, 905, 332, 3755, 19, 14, 968, 15, 17, 31, 22, 79, 749, 20, 44...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
ignoring records with null values in them on insert === I have the following table: inventor(**inventorID**, *PatentNo*, InventorFirst, InventorLast, City, State) where inventorid is pk, patentno is fk. This is the current insert code: insert into Inventor (PatentNo, InventorFirst, InventorLast, City, statename, country, NationalityCountry, ResidenceCountry) select PatentNo, InventorFirstname, InventorLastname, City, statename, country, NationalityCountry, ResidenceCountry from InventorUpdate; I want to modify this so that if InventorFirstname & InventorLastname fields are blank then it does not insert into the inventor table
0
[ 2, 9321, 742, 29, 16203, 4070, 19, 105, 27, 14692, 800, 3726, 3726, 31, 57, 14, 249, 859, 45, 10981, 5, 1409, 108, 3124, 9819, 43, 1409, 15, 1637, 5972, 2291, 251, 2483, 15, 10981, 3552, 15, 10981, 8558, 15, 136, 15, 146, 6, 113...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Adding new installer class in windows application getting compiler error === I have created a widows application with setup project. I compiled and build.Everything looks fine. For changing the configuration file during installation am trying to add a new Installer file. when i add it by default i get the below code [RunInstaller(true)] public partial class Installer : Installer { public Installer() { InitializeComponent(); } } before modifying When i compile this Am gettin **Circular base class dependency involving 'windows_setup.Installer' and 'windows_setup.Installer'** windows setup is the name space i used for the application After that i changed the class name to public partial class MyInstaller : Installer Now am getting **Inconsistent accessibility: base class 'windows_setup.Installer' is less accessible than class 'windows_setup.MyInstaller** Why am getting this and how to resolve this...? Thanks
0
[ 2, 4721, 78, 16146, 106, 718, 19, 1936, 3010, 1017, 21486, 7019, 800, 3726, 3726, 31, 57, 679, 21, 5151, 18, 3010, 29, 18161, 669, 9, 31, 9316, 17, 1895, 9, 13224, 1879, 1123, 9, 26, 4226, 14, 8091, 3893, 112, 7758, 589, 749, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
structuremap using scan in objectfactory.initialize and also custom registry === I am learning to use structuremap and I've come into the following situation - I have been moving along fine using the following code in my global.asax - ObjectFactory.Initialize(registry => registry.Scan(x => { x.AssembliesFromApplicationBaseDirectory(); x.WithDefaultConventions(); x.LookForRegistries(); })); now, i've come upon an instance where I have to create a registry and use that as well - ObjectFactory.Initialize(registry => registry.AddRegistry<MyRegistry>()); Can someone tell me how I can accomplish this? Do I have to and create registries for everything now, or can I create one registry that will scan that I can then use with the other registry? Thanks for any thoughts.
0
[ 2, 1411, 15022, 568, 8313, 19, 3095, 17455, 93, 9, 27313, 2952, 17, 67, 5816, 18269, 800, 3726, 3726, 31, 589, 2477, 20, 275, 1411, 15022, 17, 31, 22, 195, 340, 77, 14, 249, 1858, 13, 8, 31, 57, 74, 1219, 303, 1123, 568, 14, 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...
can I get T**(c style 2 dimensional array ) from boost::multi_array<T, 2>? === because I want to use boost::multi_array<>, and at the same time, there's legacy library requires c style 2d array.
0
[ 2, 92, 31, 164, 13, 38, 1409, 5, 150, 1034, 172, 13, 7865, 7718, 13, 6, 37, 10419, 45, 45, 21531, 1, 8576, 93, 1, 38, 15, 172, 1, 60, 800, 3726, 3726, 185, 31, 259, 20, 275, 10419, 45, 45, 21531, 1, 8576, 93, 1, 15, 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...
uiimage not being put into subview correctly === This is a difficult problem to explain... but i'll do my best. First a background on the problem, basically i am creating a paint like app for ios and wanted to add a functionality that allows the user to select part of the image (multi-touch shows an opaque rectangle) and delete/copy-paste/rotate that part. I have got the delete and copy-paste working perfectly but the rotation is another story. To rotate the part of the image I first start by copying the part of the image and setting it to be the background of the selected rectangle layer, then the user rotates by an arbitrary angle using a slider. The problem is that sometimes the image ends up being displayed from another location of the rectangle (meaning the copied image hangs off the wrong corner of the rectangle). I thought this could be a problem with my rectangle.frame.origin but the value for that seems to be correct through various tests. It also seems to change depending on the direction that the drag goes in... __These Are Screens of the problem__ ![1](http://i49.tinypic.com/dfu77m.jpg) ![2](http://i48.tinypic.com/14ikdxl.jpg) ![3](http://i46.tinypic.com/16kqpoi.jpg) In each of the above cases the mismatched part of the image should be inside the grey rectangle, i am at a loss as to what the problem is. bg = [[UIImageView alloc] initWithImage:[self crop:rectangle.frame:drawImage.image]]; [rectangle addSubview:bg]; drawImage is the users drawing, and rectangle is the selected grey area. crop is a method which returns a part of a given image from a give rect. I am also having trouble with pasting an arbitrarily rotated image.. any ideas on how to do that?
0
[ 2, 13, 5661, 22039, 52, 142, 442, 77, 972, 4725, 12044, 800, 3726, 3726, 48, 25, 21, 1956, 1448, 20, 3271, 9, 9, 9, 47, 31, 22, 211, 107, 51, 246, 9, 64, 21, 2395, 27, 14, 1448, 15, 11374, 31, 589, 2936, 21, 5107, 101, 4865,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Searching script in Python === im trying to make a script which search some file in whole computer similar to Search in windows. I want to do it without any libraries. I started with setting dir to begginng of disk and then checking how much dirs i have - i want to make a function that will search for new dirs in current dir so at the end ill have list of all dirs in disk. But when i try to found all files ending with ".txt", i get error message WindowsError5 Acces Denied. What am i doing wrong? Thanks import os os.chdir("\\.") dir = os.listdir() dirs = [] for x in dir: if os.path.isdir(x): dirs.append(x) for y in dirs: o = os.listdir(y) for p in o: if p.endswith(".txt"): print(p) input()
0
[ 2, 5792, 3884, 19, 20059, 800, 3726, 3726, 797, 749, 20, 233, 21, 3884, 56, 2122, 109, 3893, 19, 979, 1428, 835, 20, 2122, 19, 1936, 9, 31, 259, 20, 107, 32, 366, 186, 8649, 9, 31, 373, 29, 2697, 13, 9035, 20, 9985, 5831, 2723...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Package Name for Personal Android App === If i want to create Android application and publish it to market, can i use com.wordpress.MyName.appName for my package name ? What's usually package name for personal publish application in android market ?
0
[ 2, 6030, 204, 26, 1319, 13005, 4865, 800, 3726, 3726, 100, 31, 259, 20, 1600, 13005, 3010, 17, 10824, 32, 20, 1135, 15, 92, 31, 275, 13, 960, 9, 9587, 5890, 9, 915, 7259, 9, 7753, 7259, 26, 51, 6030, 204, 13, 60, 98, 22, 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, 0, 0, 0, 0, 0...
Create a new Cellular Automata rule in Mathematica === I need to create a new CA RULE in Mathematica. How can I do? I mean, I need to create a CA with 3 colors (Black, White and Grey). May you help me?
0
[ 2, 1600, 21, 78, 14844, 3108, 12724, 1828, 19, 5057, 5996, 12630, 800, 3726, 3726, 31, 376, 20, 1600, 21, 78, 1658, 1828, 19, 5057, 5996, 12630, 9, 184, 92, 31, 107, 60, 31, 884, 15, 31, 376, 20, 1600, 21, 1658, 29, 203, 5268, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0...
Unable to bind observale collection to ItemsControl === I have an Observable Collection, which I am trying to bind to an ItemsControl. The following is the snippet from my code. **Class Sample.ViewModel:** //Observabale collection getter/setter property public ObservableCollection<SQuestion> SList { get { return _sList; } set { if (_sList == value) return; _sList = value; if(PropertyChanged!=null) PropertyChanged(this, new PropertyChangedEventArgs("ListOfSamples")); } } **.xaml code:**<br/> **View/Mainwindow.xaml** <ItemsControl Height="422" HorizontalAlignment="Left" Margin="12,12,0,0" Name="listBox1" VerticalAlignment="Top" Width="751" ItemsSource="{Binding SList}" ItemTemplate="{StaticResource perItemTemplate}"/> In the above code, I have the specified the ItemsSource Binding but on running my application, the list does not appear in the ItemsControl and everything appears blank.:<br/> However, if I try to assign the source to Listbox from my .cs code-behind as `listBox1.ItemsSource = SList`, the list box gets populated and works as expected.<br/> Can somebody point what's the problem in the above with Binding that I am doing so that I can bind from xaml directly and not using code-behind?
0
[ 2, 2343, 20, 10193, 5122, 10321, 4482, 1206, 20, 3755, 12898, 800, 3726, 3726, 31, 57, 40, 5122, 10321, 579, 1206, 15, 56, 31, 589, 749, 20, 10193, 20, 40, 3755, 12898, 9, 14, 249, 25, 14, 13, 29061, 37, 51, 1797, 9, 13, 1409, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 there a rating plugin or extension for Disqus? === What i'm looking for is a plugin or an extension or an addon on the popular disqus.com platform that adds a star rating along with the comment and discussion. If a user leaves a comment, he can choose to have a rating added also. Hence when the comment is displayed, the rating should also be shown. I dont require the the ratings to be part of the reply to a comment. If you know of a plugin, extension or addon - please let me know, or if anyone can comment if this can be built using the Disqus API, it would be helpful.
2
[ 2, 25, 80, 21, 4647, 10922, 108, 54, 3896, 26, 1460, 5495, 18, 60, 800, 3726, 3726, 98, 31, 22, 79, 699, 26, 25, 21, 10922, 108, 54, 40, 3896, 54, 40, 3547, 218, 27, 14, 844, 1460, 5495, 18, 9, 960, 2452, 30, 10621, 21, 778,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...