unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
iOS build automation: how to (re)store certificate and identity in keychain at every build === I am in the process of automating the iOS build process for our apps. A noticeable difference between building iOS apps and (i.e.) java applications is that iOS features this "private key - certificate - provisioning profile" combination. My idea is that my automation script would have everything it needs stored in the source code version control system (VCS) and would configure what it needs when launched. Specifically, it would also install identities stored in the VCS if needed. This would allow to simply replace the build machine without manual intervention from this point of view. So here is the question: Is there a way to programmatically install an identity (e.g. "iPhone Distribution:MY_COMPANY") with its related private key in keychain given the 'export' file in '.p12' format? I briefly read about the 'security' cmd line tool, is it the right way? Thanks everybody in advance.
0
[ 2, 13, 7760, 1895, 23217, 45, 184, 20, 13, 5, 99, 6, 16828, 6259, 17, 3270, 19, 1246, 17317, 35, 352, 1895, 800, 3726, 3726, 31, 589, 19, 14, 953, 16, 3108, 79, 1880, 14, 13, 7760, 1895, 953, 26, 318, 4865, 18, 9, 21, 20206, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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: screen goes back to portrait mode when turning screen off === In my manifest file I specified <code>android:configChanges="orientation"</code>. And I noticed that when turning off the screen while in landscape the <code>onConfigurationChanged()</code> method is called once with portrait status and then called again with landscape status when waking up the screen. What is the reason for this ? Is there any way to disable it ?
0
[ 2, 13005, 45, 2324, 1852, 97, 20, 5548, 3740, 76, 2101, 2324, 168, 800, 3726, 3726, 19, 51, 13160, 3893, 31, 9931, 13, 1, 9375, 1, 290, 18524, 45, 14093, 2816, 16229, 18, 3726, 7, 9712, 857, 7, 1, 118, 9375, 1, 9, 17, 31, 2711...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C#: Create an array, then mass allocate variables === Is it possible to do something like byte[] byteArray = new byte[100] byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10} and then set the rest of the variables later? I would rather avoid using: byteArray[0] = 0x00; byteArray[1] = 0x01; and so on
0
[ 2, 272, 5910, 45, 1600, 40, 7718, 15, 94, 1619, 65, 111, 9530, 12157, 800, 3726, 3726, 25, 32, 938, 20, 107, 301, 101, 34, 591, 2558, 500, 34, 591, 8576, 93, 800, 78, 34, 591, 2558, 4031, 500, 34, 591, 8576, 93, 800, 13, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to Check the Hashmap's First element? === for(Map.Entry<Integer, Integer> entry :useridTotalRankMapSorted.entrySet()) { System.out.println( entry.getKey() +"----"+entry.getValue()); if(entry.getKey() == callinguserid ) { System.out.println( "GOOD CALL"); break; } } How can I avoid the for loop mentioned above .
0
[ 2, 184, 20, 2631, 14, 19170, 15022, 22, 18, 64, 4520, 60, 800, 3726, 3726, 26, 5, 15022, 9, 18195, 1, 6391, 13699, 15, 13820, 1, 2792, 13, 45, 3699, 5175, 20148, 23083, 15022, 22843, 69, 9, 18195, 3554, 5, 6, 6, 13, 1, 329, 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...
gnuplot-iostream won't compile === I was wondering if someone could help me with this. I've retrieved the source code for the gnuplot-iostream interface from http://www.stahlke.org/dan/gnuplot-iostream/. However, when I attempt to compile the code using the command: ]$ cmake .; make I get the following compiler error /.../gnuplot-iostream.h: In constructor ‘Gnuplot::Gnuplot(const std::string&)’: /.../gnuplot-iostream.h:427: error: ‘never_close_handle’ is not a member of ‘boost::iostreams’ I'm using Scientific Linux 6.2 (kernal 2.6.32-220.23.1.el6.x86_64), g++ 4.4.6, and have boost libraries installed (/usr/include/boost/iostreams/ exists). Any assistance would be very much appreciated. D
0
[ 2, 26092, 13221, 38, 8, 1963, 11260, 230, 22, 38, 26561, 800, 3726, 3726, 31, 23, 5712, 100, 737, 110, 448, 55, 29, 48, 9, 31, 22, 195, 3685, 14, 1267, 1797, 26, 14, 26092, 13221, 38, 8, 1963, 11260, 6573, 37, 7775, 6903, 6483, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 error: facebook connect - Cannot use string offset as an array === This is the error: `Cannot use string offset as an array in line 41` line 41 is this : `$data['first_name'] = $user_details[0]['first_name'];` this is the code: $user_details = $facebook->api_client->users_getInfo($authData["uid"], 'first_name,last_name,pic_square,email'); $data['first_name'] = $user_details[0]['first_name']; $data['last_name'] = $user_details[0]['last_name']; $data['pic'] = $user_details[0]['pic_square']; $data['email'] = $user_details[0]['email']; $data['uid'] = $user_details[0]['uid']; easyRegister($data['uid'],$data['first_name'],$data['last_name'],$data['email'],$data['pic'],1);
0
[ 2, 13, 26120, 7019, 45, 9090, 6379, 13, 8, 1967, 275, 3724, 17493, 28, 40, 7718, 800, 3726, 3726, 48, 25, 14, 7019, 45, 13, 1, 1245, 1270, 275, 3724, 17493, 28, 40, 7718, 19, 293, 4390, 1, 293, 4390, 25, 48, 13, 45, 13, 1, 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...
Applying specific commit(s) from one git repository on another === We are developing automation code that runs against multiple different versions of our company's products. Per product version we're aiming to keep a dedicated code branch in Git. Branches may diverge and contain different history, however for some commits which may be valuable for multiple product versions, we'd like to have the ability to apply them on other branches than the one they were made on. I know one option that is used in the open source world is sending Patches across (creating patches and applying them on the target branch(es) ). What are the possible ways to perform this operation? Is a Patch the only way?
0
[ 2, 11989, 1903, 9686, 5, 18, 6, 37, 53, 13, 10404, 24869, 27, 226, 800, 3726, 3726, 95, 50, 3561, 23217, 1797, 30, 1461, 149, 1886, 421, 3281, 16, 318, 237, 22, 18, 1985, 9, 416, 2374, 615, 95, 22, 99, 15442, 20, 643, 21, 2360...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Alternative for synchronized block in java === I use following code for guarantee `startTime` variable set once only: public class Processor { private Date startTime; public void doProcess() { if(startTime == null) synchronized(this) { if(startTime == null) { startTime = new Date(); } } // do somethings } } I will guarantee by this code for variable instantiated once only for any number of invoking `process` method call. My question is: Is there alternative approach for my code be more concise? (for sample remove `if` & `synchronized` statements)
0
[ 2, 2676, 26, 27202, 1921, 19, 8247, 800, 3726, 3726, 31, 275, 249, 1797, 26, 9120, 13, 1, 13680, 891, 1, 7612, 309, 382, 104, 45, 317, 718, 14762, 13, 1, 932, 1231, 799, 891, 73, 317, 11364, 107, 16835, 5, 6, 13, 1, 100, 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...
I wrote an android application to receive Bluetooth headset event, but onReceive() is not getting invoked === I wrote an android application to receive Bluetooth headset event, but onReceive() is not getting invoked.though I am not sure if the ACTION_MEDIA_BUTTON is used as an event or would be it other than this event. sample code to implemenent receiver: import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; import android.view.KeyEvent; import android.widget.Toast; public class MediaButtonIntentReceiver extends BroadcastReceiver { private static final String TAG = "MediaButtonIntentReceiver"; public MediaButtonIntentReceiver() { super(); } @Override public void onReceive(Context context, Intent intent) {//OnReceive String intentAction = intent.getAction(); //getAction() Log.d(TAG, "onReceive called"); if (!Intent.ACTION_MEDIA_BUTTON.equals(intentAction)) { return; } KeyEvent event = (KeyEvent)intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT); if (event == null) { return; } int action = event.getAction(); if (action == KeyEvent.ACTION_DOWN) { // do something Toast.makeText(context, "BUTTON PRESSED!", Toast.LENGTH_SHORT).show(); } abortBroadcast(); } } Activity looks likes this : public class myactivity extends Activity { private static final String TAG ="Bluetooth_priority"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { //onCreate super.onCreate(savedInstanceState); Log.d(TAG, "Oncreate called"); setContentView(R.layout.main); IntentFilter filter = new IntentFilter(Intent.ACTION_MEDIA_BUTTON); MediaButtonIntentReceiver r = new MediaButtonIntentReceiver(); filter.setPriority(1000); // set teh priority registerReceiver(r, filter); //register } } Manifest.xml looks like this : <receiver android:name="MediaButtonIntentReceiver"> <intent-filter android:priority="1000"> <action android:name="android.intent.action.MEDIA_BUTTON" /> </intent-filter> Incase anyone know about this, please reply.Even setting the priority to 2147483647, it doesn't work.
0
[ 2, 31, 738, 40, 13005, 3010, 20, 2588, 705, 15808, 157, 3554, 807, 15, 47, 27, 99, 1105, 1284, 5, 6, 25, 52, 1017, 26252, 800, 3726, 3726, 31, 738, 40, 13005, 3010, 20, 2588, 705, 15808, 157, 3554, 807, 15, 47, 27, 99, 1105, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to include a native library that use posix headers in android ndk === I have to include a static native library (dsplink.a) which uses System V IPCs in android ndk project. Including my library in android.mk as, LOCAL_LDLIBS := ($MY-PATH)/dsplink.a gives the following error: _sync_usr.c:(.text+0x24b4): undefined reference to `semget' _sync_usr.c:(.text+0x24d4): undefined reference to `__errno_location' _sync_usr.c:(.text+0x24f4): undefined reference to `semget' _sync_usr.c:(.text+0x2538): undefined reference to `semctl' semctl,semget,.. functions are included from sys/sem.h. Is there any way to include the library ?
0
[ 2, 184, 20, 468, 21, 1275, 1248, 30, 275, 2353, 6742, 157, 445, 19, 13005, 13, 706, 197, 800, 3726, 3726, 31, 57, 20, 468, 21, 12038, 1275, 1248, 13, 5, 43, 3401, 6258, 9, 58, 6, 56, 2027, 329, 566, 31, 5779, 18, 19, 13005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Copy Constructor with No Arguments === have written this little class, which generates a UUID every time an object of this class is created. #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_generators.hpp> #include <boost/uuid/uuid_io.hpp> class myClass { public: boost::uuids::uuid GetUUID(); virtual ~myClass(); myClass() { // constructor mId = boost::uuids::random_generator()(); std::cout<< "object created with uuid " << mId <<std::endl; } private: boost::uuids::uuid mId; } At some point, I am pushing these objects to a vector and equating that vector with another vector using simple assignment operator. To ensure the objects in the new vector do not generate new UUIDs, I want to write a copy constructor. But as you can see, the constructor needs to arguments. So I am not sure how to write the copy constructor. Moreover, if I have multiple variables instead of just one UUID, how do I handle that situation?
0
[ 2, 4344, 6960, 248, 29, 90, 10553, 800, 3726, 3726, 57, 642, 48, 265, 718, 15, 56, 7920, 18, 21, 13, 19612, 1340, 352, 85, 40, 3095, 16, 48, 718, 25, 679, 9, 6926, 22640, 13, 1, 10858, 384, 118, 19612, 1340, 118, 19612, 1340, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Onflush + computeChangeSet not generating PK === i'm working with `onFlush` event inside a listener. There i'm creating `2 new entities`, the `second one uses as PK the primary key of the first one` and when persisting that second entity i'm getting an error which complains about first entity not having its id generated. To persist first entity i call: $om->persist( $entity ); $class = $om->getClassMetadata( get_class( $entity ) ); $om->getUnitOfWork()->computeChangeSet( $class, $entity ); Does any one knows how to force Id generation on the first entity? Thanks!
0
[ 2, 27, 12848, 1635, 2754, 23909, 16229, 3554, 52, 13500, 13, 17244, 800, 3726, 3726, 31, 22, 79, 638, 29, 13, 1, 218, 12848, 1635, 1, 807, 572, 21, 21772, 9, 80, 31, 22, 79, 2936, 13, 1, 135, 78, 12549, 1, 15, 14, 13, 1, 500...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
pycurl only geting part of the response === I'm making a request in python using pycurl to a URL which returns a reasonably large json formatted response. When I goto the URL in a browser I see the entire contents, but if I use pycurl and print the received data, I only see about half of what I see when I browse to the URL, and I get an error parsing the data using the json library stating : > ValueError: Unterminated string starting at: line 1 column 16078 (char 16078) The pycurl request is this : conn = pycurl.Curl() conn.setopt(pycurl.URL, myUrl) conn.setopt(pycurl.WRITEFUNCTION, on_receive) conn.setopt(pycurl.CONNECTTIMEOUT, 30) conn.setopt(pycurl.TIMEOUT, 30) conn.setopt(pycurl.NOSIGNAL, 10) conn.perform() with the on_receive function currently just printing the data. Does anybody know why I am only getting part of the response? I have used massive timeouts just for trying to solve this, I had initially not specified any timeouts but was still getting this error.
0
[ 2, 7103, 4734, 255, 104, 164, 68, 141, 16, 14, 1627, 800, 3726, 3726, 31, 22, 79, 544, 21, 3772, 19, 20059, 568, 7103, 4734, 255, 20, 21, 287, 6362, 56, 4815, 21, 19531, 370, 487, 528, 13, 29850, 1627, 9, 76, 31, 330, 111, 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...
Tomcat not running in eclipse === I am trying to get Tomcat to work in eclipse but it simply refuses to. I have followed [this][1] and [this][2] tutorial. But it keeps displaying the page below despite my efforts.It says that server is started succesfully in eclipse. But I am unable to access localhost:8080 in my browser. THe server works perfectly fine if I manually start it from the start menu. However when I try to run an application from eclipse it does not work. Could someone please help me out? ![enter image description here][3] ![enter image description here][4] [1]: http://www.vogella.com/articles/EclipseWTP/article.html [2]: http://theopentutorials.com/env-setup/java-ee/how-to-configure-apache-tomcat-in-eclipse-ide/ [3]: http://i.stack.imgur.com/B42XL.png [4]: http://i.stack.imgur.com/mRxMH.png
0
[ 2, 2067, 5782, 52, 946, 19, 11652, 800, 3726, 3726, 31, 589, 749, 20, 164, 2067, 5782, 20, 170, 19, 11652, 47, 32, 1659, 10864, 20, 9, 31, 57, 709, 636, 1565, 500, 2558, 165, 500, 17, 636, 1565, 500, 2558, 135, 500, 29724, 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...
How to recover a partition that I can not see as a drive but it exists? === My hard drive has 3 partitions, C:\ has the Windows, 2 other partitions contain the data. I can see only one of these two partitions. Normally I can not see the other partition but when I use Harddisk recovery programs I see that partition. I also see that there is data in that partition. Can anybody tell me how can I recover that partition without formatting the partition because the data inside that partition is really important for me. I use EASEUSE Partition Master Home Edition. But I was unable to recover my partition with this application. Is there any other better application to recover my partition? Thanks in advance. ![enter image description here][1] [1]: http://i.stack.imgur.com/Dh1X8.png
0
[ 2, 184, 20, 7635, 21, 10711, 30, 31, 92, 52, 196, 28, 21, 1493, 47, 32, 5636, 60, 800, 3726, 3726, 51, 552, 1493, 63, 203, 10711, 18, 15, 272, 45, 1, 63, 14, 1936, 15, 172, 89, 10711, 18, 3717, 14, 1054, 9, 31, 92, 196, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Displaying an element when hovering over it without a scroll offset === I'm trying to write a jQuery equivalent of the [HoverMenuExtender][1] from the AjaxControlToolkit, so that when I hover over an element, I can display a div that contains some context-sensitive help. I can make this work when the page first loads (mouse is hovering over the first help symbol): ![enter image description here][2] but when the page is scrolled down, the div is offset by the amount of vertical scroll (and presumably if I had horizontal scroll it would move to the right too) (mouse is still hovering over the first help symbol): ![enter image description here][3] My jQuery is: $('.hoverHelpAnchor').hover(function (e) { $(this).next().show().css('left', e.pageX).css('top', e.pageY); } , function () { $(this).next().hide(); }); CSS is: .hoverHelp { display: none; background-color: White; border-style: solid; border-width: thin; border-color: Black; width: 200px; z-index: 10000; position: fixed; margin: 2; } and my markup is: <img src="@Url.Content("~/Content/images/help.png")" class="hoverHelpAnchor" alt="" /> <div class="hoverHelp"> Project Name help blah blah blah very very very very very very very very long string that I want to word-wrap </div> I'd be grateful if someone could point out what I'm missing in order to account for the page scroll so the div doesn't appear in the offset position. [1]: http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/HoverMenu/HoverMenu.aspx [2]: http://i.stack.imgur.com/dMqiv.png [3]: http://i.stack.imgur.com/2K2YU.png
0
[ 2, 17418, 40, 4520, 76, 18503, 84, 32, 366, 21, 12159, 17493, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 21, 487, 8190, 93, 4602, 16, 14, 636, 252, 2549, 755, 291, 1706, 38, 13630, 500, 2558, 165, 500, 37, 14, 20624, 12898, 207...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Trouble with generating _site files in Jekyll === I just migrated to another computer and installed Jekyll. Now I can't seems to get Jekyll to generate my website. When I run `jekyll --no-server` I get: /Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. Configuration from /Users/sb/Sites/drb/_config.yml Building site: /Users/sb/Sites/drb -> ./_site /Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): did not find expected ',' or ']' while parsing a flow sequence at line 6 column 13 (Psych::SyntaxError) from /Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream' from /Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse' from /Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/convertible.rb:33:in `read_yaml' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/post.rb:39:in `initialize' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:163:in `new' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:163:in `block in read_posts' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:161:in `each' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:161:in `read_posts' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:128:in `read_directories' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:98:in `read' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:38:in `process' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/bin/jekyll:250:in `<top (required)>' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/bin/jekyll:19:in `load' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/bin/jekyll:19:in `<main>' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval' from /Users/sb/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>' Jekyll seems to be working correctly, but my markdown files in `_posts` do not seem to be converted to HTML, since I do not have any files in `_site`. Deleting the `_site` directory then regenerating my site creates a new `_site`, but there is no content inside the folder. Can anyone help? Thanks.
0
[ 2, 2572, 29, 13500, 13, 1, 9097, 6488, 19, 4641, 3329, 211, 800, 3726, 3726, 31, 114, 14204, 20, 226, 1428, 17, 4066, 4641, 3329, 211, 9, 130, 31, 92, 22, 38, 2206, 20, 164, 4641, 3329, 211, 20, 7920, 51, 2271, 9, 76, 31, 485,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Diffirence between hosted mode and development mode === What is the diffirence between hosted mode and development mode in GWT?
0
[ 2, 20811, 1523, 2940, 128, 2812, 3740, 17, 522, 3740, 800, 3726, 3726, 98, 25, 14, 20811, 1523, 2940, 128, 2812, 3740, 17, 522, 3740, 19, 14094, 38, 60, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
SQL command to show 0 if doesn't exist in the join table === I'm having a problem in a SQL command. I have a table with questions, other with the possible aswners to that questions and other with the replies from the users. Imagine the following example: **Question 1**: Who will win semi-final? <br/> **Aswners**: A) Portugal B) Spain<br/> **Replies**: 10 people voted B) Spain, 0 people voted A) Portugal <code>SELECT a.answer, COUNT(r.id) as total<br/> FROM replies r<br/> LEFT JOIN answers a ON a.id = r.id_answer<br/> LEFT JOIN questions q ON q.id = a.id_question<br/> WHERE q.id = 1<br/> GROUP BY r.id_answer </code> My point is to get from the <code>SELECT</code> the result:<br/> **Spain 10<br/> Portugal 0<br/>** But i can't, i don't know how to do it, because the way i did, i always get only the result from the asnwers with replies on the replies table. Like this:<br/> **Spain 10<br/>**
0
[ 2, 4444, 255, 1202, 20, 298, 713, 100, 1437, 22, 38, 3182, 19, 14, 1865, 859, 800, 3726, 3726, 31, 22, 79, 452, 21, 1448, 19, 21, 4444, 255, 1202, 9, 31, 57, 21, 859, 29, 2346, 15, 89, 29, 14, 938, 28, 6156, 445, 20, 30, 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...
Show error page when Recaptcha is wrong === Is it possible to use the "die" tag to link to an error site, instead of the text that is displayed by default? require_once('recaptchalib.php'); $privatekey = "*******"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")"); } Like: die ('error.php'); Of course this doesn't work. But I can't figure out how to use the die tag.
0
[ 2, 298, 7019, 2478, 76, 302, 4666, 38, 1651, 25, 1389, 800, 3726, 3726, 25, 32, 938, 20, 275, 14, 13, 7, 3840, 7, 3383, 20, 3508, 20, 40, 7019, 689, 15, 700, 16, 14, 1854, 30, 25, 6115, 34, 12838, 60, 4077, 1, 13120, 5, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Theard 1: EXC_BAD_ACCESS code=2 address=0x8 === i building app with SearchBar. i used this tutorial: http://ygamretuta.me/2011/08/10/ios-implementing-a-basic-search-uisearchdisplaycontroller-and-interface-builder/ here is the code: #import "TableViewController.h" @implementation TableViewController @synthesize searchDisplayController; @synthesize searchBar; @synthesize allItems; @synthesize searchResults; - (id)initWithStyle:(UITableViewStyle)style { self = [super initWithStyle:style]; if (self) { // Custom initialization } return self; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } #pragma mark - View lifecycle - (void)viewDidLoad { [super viewDidLoad]; // [self.tableView reloadData]; self.tableView.scrollEnabled = YES; NSArray *items = [[NSArray alloc] initWithObjects: @"Code Geass", @"Asura Cryin'", @"Voltes V", @"Mazinger Z", @"Daimos", nil]; self.allItems = items; [items release]; [self.tableView reloadData]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSInteger rows = 0; if ([tableView isEqual:self.searchDisplayController.searchResultsTableView]){ rows = [self.searchResults count]; } else{ rows = [self.allItems count]; } return rows; } - (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope { NSPredicate *resultPredicate = [NSPredicate predicateWithFormat:@"SELF contains[cd] %@", searchText]; self.searchResults = [self.allItems filteredArrayUsingPredicate:resultPredicate]; } - (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]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; } /* Configure the cell. */ if ([tableView isEqual:self.searchDisplayController.searchResultsTableView]){ cell.textLabel.text = [self.searchResults objectAtIndex:indexPath.row]; } else{ cell.textLabel.text = [self.allItems objectAtIndex:indexPath.row]; } return cell; } -(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { [self filterContentForSearchText:searchString scope:[[self.searchDisplayController.searchBar scopeButtonTitles] objectAtIndex:[self.searchDisplayController.searchBar selectedScopeButtonIndex]]]; return YES; } - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchScope:(NSInteger)searchOption { [self filterContentForSearchText:[self.searchDisplayController.searchBar text] scope:[[self.searchDisplayController.searchBar scopeButtonTitles] objectAtIndex:searchOption]]; return YES; } - (void)dealloc { [super dealloc]; } #pragma mark - Table view delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. /* <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; // ... // Pass the selected object to the new view controller. [self.navigationController pushViewController:detailViewController animated:YES]; [detailViewController release]; */ } @end what the problem? i'm using Xcode 4.1 OSX Lion please help me. edit: my app crashed only when i trying to search at the search bar.
0
[ 2, 14, 1514, 6352, 1396, 150, 1, 5989, 1, 20604, 1797, 3726, 135, 3218, 3726, 387, 396, 457, 800, 3726, 3726, 31, 353, 4865, 29, 2122, 1850, 9, 31, 147, 48, 29724, 45, 7775, 6903, 93, 7253, 6239, 7100, 9, 790, 118, 3097, 118, 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...
Java 3d API: Rotating a BoundingBox delivers a new Box with more volume === I am writing a little game with the Java 3D API and i use objects of javax.media.j3d.BoundingBox to store the Bounds of a model. The constructor of the BoundingBox is the following one: public BoundingBox(Point3d lower, Point3d upper) { boundId = BOUNDING_BOX; this.lower = new Point3d(lower); this.upper = new Point3d(upper); updateBoundsStates(); } Now i want to translate and rotate the BoundingBox because the model itself does and i use the following method of BoundingBox: /** * Transforms this bounding box by the given matrix. * @param matrix a transformation matrix */ public void transform(Transform3D matrix) { if(boundsIsInfinite) return; if (tmpP3d == null) { tmpP3d = new Point3d(); } double ux, uy, uz, lx, ly, lz; ux = upper.x; uy = upper.y; uz = upper.z; lx = lower.x; ly = lower.y; lz = lower.z; tmpP3d.set(ux, uy, uz); matrix.transform( tmpP3d ); upper.x = tmpP3d.x; upper.y = tmpP3d.y; upper.z = tmpP3d.z; lower.x = tmpP3d.x; lower.y = tmpP3d.y; lower.z = tmpP3d.z; tmpP3d.set(lx, uy, uz); matrix.transform( tmpP3d ); if ( tmpP3d.x > upper.x ) upper.x = tmpP3d.x; if ( tmpP3d.y > upper.y ) upper.y = tmpP3d.y; if ( tmpP3d.z > upper.z ) upper.z = tmpP3d.z; if ( tmpP3d.x < lower.x ) lower.x = tmpP3d.x; if ( tmpP3d.y < lower.y ) lower.y = tmpP3d.y; if ( tmpP3d.z < lower.z ) lower.z = tmpP3d.z; tmpP3d.set(lx, ly, uz); matrix.transform( tmpP3d ); if ( tmpP3d.x > upper.x ) upper.x = tmpP3d.x; if ( tmpP3d.y > upper.y ) upper.y = tmpP3d.y; if ( tmpP3d.z > upper.z ) upper.z = tmpP3d.z; if ( tmpP3d.x < lower.x ) lower.x = tmpP3d.x; if ( tmpP3d.y < lower.y ) lower.y = tmpP3d.y; if ( tmpP3d.z < lower.z ) lower.z = tmpP3d.z; tmpP3d.set(ux, ly, uz); matrix.transform( tmpP3d ); if ( tmpP3d.x > upper.x ) upper.x = tmpP3d.x; if ( tmpP3d.y > upper.y ) upper.y = tmpP3d.y; if ( tmpP3d.z > upper.z ) upper.z = tmpP3d.z; if ( tmpP3d.x < lower.x ) lower.x = tmpP3d.x; if ( tmpP3d.y < lower.y ) lower.y = tmpP3d.y; if ( tmpP3d.z < lower.z ) lower.z = tmpP3d.z; tmpP3d.set(lx, uy, lz); matrix.transform( tmpP3d ); if ( tmpP3d.x > upper.x ) upper.x = tmpP3d.x; if ( tmpP3d.y > upper.y ) upper.y = tmpP3d.y; if ( tmpP3d.z > upper.z ) upper.z = tmpP3d.z; if ( tmpP3d.x < lower.x ) lower.x = tmpP3d.x; if ( tmpP3d.y < lower.y ) lower.y = tmpP3d.y; if ( tmpP3d.z < lower.z ) lower.z = tmpP3d.z; tmpP3d.set(ux, uy, lz); matrix.transform( tmpP3d ); if ( tmpP3d.x > upper.x ) upper.x = tmpP3d.x; if ( tmpP3d.y > upper.y ) upper.y = tmpP3d.y; if ( tmpP3d.z > upper.z ) upper.z = tmpP3d.z; if ( tmpP3d.x < lower.x ) lower.x = tmpP3d.x; if ( tmpP3d.y < lower.y ) lower.y = tmpP3d.y; if ( tmpP3d.z < lower.z ) lower.z = tmpP3d.z; tmpP3d.set(lx, ly, lz); matrix.transform( tmpP3d ); if ( tmpP3d.x > upper.x ) upper.x = tmpP3d.x; if ( tmpP3d.y > upper.y ) upper.y = tmpP3d.y; if ( tmpP3d.z > upper.z ) upper.z = tmpP3d.z; if ( tmpP3d.x < lower.x ) lower.x = tmpP3d.x; if ( tmpP3d.y < lower.y ) lower.y = tmpP3d.y; if ( tmpP3d.z < lower.z ) lower.z = tmpP3d.z; tmpP3d.set(ux, ly, lz); matrix.transform( tmpP3d ); if ( tmpP3d.x > upper.x ) upper.x = tmpP3d.x; if ( tmpP3d.y > upper.y ) upper.y = tmpP3d.y; if ( tmpP3d.z > upper.z ) upper.z = tmpP3d.z; if ( tmpP3d.x < lower.x ) lower.x = tmpP3d.x; if ( tmpP3d.y < lower.y ) lower.y = tmpP3d.y; if ( tmpP3d.z < lower.z ) lower.z = tmpP3d.z; if (VirtualUniverse.mc.releaseBoundingBoxMemory) { // Free memory tmpP3d = null; } } But: if you use this method to rotate the BoundingBox it produces a new BoundingBox that may be larger in volume than the old one. It only delivers the same volume if you rotate exactly by 90, 180, 270 or 360 degrees. Additional information: i must calculate the BoundingBox manually because i use manual bounds (and not the too large automatically calculated Bounds) by calling setAutoComputeBounds(false) and setBounds(XYZ) on the model (in this case it is actually an instance of javax.media.j3d which points to a javax.media.j3d.SharedGroup) and it seems that the Java 3d Engine (at least in this scenario) don't recalculate your manual bounds automatically in the case of translation/rotation of the corresponding model. My question is: how must i (re-)implement the above shown method transform() to get BoundingBoxes which have always the same volume?
0
[ 2, 8247, 203, 43, 21, 2159, 45, 16164, 21, 4138, 68, 5309, 5879, 18, 21, 78, 1649, 29, 91, 2310, 800, 3726, 3726, 31, 589, 1174, 21, 265, 250, 29, 14, 8247, 203, 43, 21, 2159, 17, 31, 275, 3916, 16, 8247, 396, 9, 8260, 9, 72...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
response.redirect is not working when I pass CustomerProductSearchType as query string and pass encrypted value === Response.Redirect("OutboundCall.aspx?CustomerProductSearchType=" + Server.UrlEncode(Cryptography.Crypto.Encrypt(intCallTypeID.ToString(), KeyValue)), false); // don't redirect from one login but work on another. // If I change CustomerProductSearchType key name or use value without encryption it works. Please help me.
0
[ 2, 1627, 9, 99, 14706, 25, 52, 638, 76, 31, 1477, 7705, 14086, 25136, 4474, 28, 25597, 3724, 17, 1477, 29403, 1923, 800, 3726, 3726, 1627, 9, 99, 14706, 5, 7, 1320, 7410, 9200, 9, 472, 306, 396, 60, 4636, 262, 1263, 14086, 25136, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Your way to write simple comments === How do you guys write comments on some simple code that you use just for yourself? I mostly write JavaScript and PHP code, and I can't really feel like I found a nice way to write comments. If I have a short line of code, I usually do this: x = doThis(getSomeValueFromSomewhere()); // This is a short line of code Which seems really nice I think, but it doesnt really works when the line gets a little longer or on multiple lines, // Dont really like this since it's not clear if it describes only line 1, or all lines. aLongerVariableName = (getSomeValueFromSomewhere() == "this is what I want") ? "true value" : "false value"; x = doThis(aLongerVariableName); So, how do you do it?
0
[ 2, 154, 161, 20, 2757, 1935, 7534, 800, 3726, 3726, 184, 107, 42, 2776, 2757, 7534, 27, 109, 1935, 1797, 30, 42, 275, 114, 26, 2834, 60, 31, 1555, 2757, 8247, 8741, 17, 13, 26120, 1797, 15, 17, 31, 92, 22, 38, 510, 583, 101, 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...
knockout execute code after template application === How do I execute my custom code after all normal processinig associated with changing observable's value took place (most importanly changes to DOM)? I tried subscribe method of an observable, but the function is executed too early (the DOM is not yet modified).
0
[ 2, 11676, 15644, 1797, 75, 22894, 3010, 800, 3726, 3726, 184, 107, 31, 15644, 51, 5816, 1797, 75, 65, 1826, 953, 108, 2816, 1598, 29, 4226, 5122, 10321, 579, 22, 18, 1923, 199, 209, 13, 5, 4630, 9010, 210, 102, 1693, 20, 11859, 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...
TFS View History for specifc User === I'm using TFS 2010 and am wondering whether there is an easy way, either through the IDE (or via the command line), to view the check-in history for a given user, filtered by time. Basically, I would like to see a list of all the changesets for a given user (or simply current user) and be able to specify a date range.
0
[ 2, 13, 11720, 18, 1418, 447, 26, 12737, 821, 150, 4155, 800, 3726, 3726, 31, 22, 79, 568, 13, 11720, 18, 498, 17, 589, 5712, 1472, 80, 25, 40, 2010, 161, 15, 694, 120, 14, 13, 3448, 13, 5, 248, 1197, 14, 1202, 293, 6, 15, 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...
sound comparison in android === Hi i am very new to android app development.. I am doing an app that can save a sound file in the database and then if that sound is played, the app will be able to detect that sound and show the user that the sound being played is the sound that was saved in the database. Can anyone help me with this. Is it possible to do this on android? I am not sure how to go about doing this on android platform. Please help.Thank You
0
[ 2, 646, 6050, 19, 13005, 800, 3726, 3726, 4148, 31, 589, 253, 78, 20, 13005, 4865, 522, 9, 9, 31, 589, 845, 40, 4865, 30, 92, 2079, 21, 646, 3893, 19, 14, 6018, 17, 94, 100, 30, 646, 25, 257, 15, 14, 4865, 129, 44, 777, 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...
Object at index in NSArray === I have an array. I want to check whether there is an object present in a particular index or not. How to do this? Please help.
0
[ 2, 3095, 35, 4348, 19, 13, 103, 4964, 2787, 800, 3726, 3726, 31, 57, 40, 7718, 9, 31, 259, 20, 2631, 1472, 80, 25, 40, 3095, 734, 19, 21, 1498, 4348, 54, 52, 9, 184, 20, 107, 48, 60, 2247, 448, 9, 3, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
MSSQL 2008. I can't find Login for particular database user === I found a user in mssql 2008 database - domain\testuser2 with login domain\testuser2. But I couldn't find this login by using Mssql Management Studio or in the system tables (sys.server_principals, sys.syslogins, sys.linked_logins, sys.remote_logins). When I try to make another user with this login (CREATE USER _test FOR login [domain\testuser2]), the error is following: The login already has an account under a different user name. So, this login is exist. Where could I find it? Is there some system tables or views?
0
[ 2, 4235, 18, 22402, 570, 9, 31, 92, 22, 38, 477, 6738, 108, 26, 1498, 6018, 4155, 800, 3726, 3726, 31, 216, 21, 4155, 19, 4235, 18, 22402, 570, 6018, 13, 8, 4603, 1, 10543, 16704, 135, 29, 6738, 108, 4603, 1, 10543, 16704, 135, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
SVG with embed tag: Safari doesn't scale right === I'm trying to add svg's to my "sheets reader" with the embed html-tag. It works fine in FF, in Chrome, even in IE9, but when I open the page in Safari, it's not scaling and I'm getting scrollbars. Here's my testing environment: http://www.nie-wieder.net/br/BookReaderDemo/noten.html#page/1/mode/1up just open it in safari (version 5.1.7, perhaps on mac only?! just got a mac right here) and you'll know what I mean. So, my Question is: Is there any way to get the svg file at the demo to scale right in Safari? I searched around here and found nothing to this specific question, so I hope you can help me :)
0
[ 2, 13, 18, 22955, 29, 11911, 69, 3383, 45, 25055, 1437, 22, 38, 3464, 193, 800, 3726, 3726, 31, 22, 79, 749, 20, 3547, 13, 18, 22955, 22, 18, 20, 51, 13, 7, 17627, 18, 7765, 7, 29, 14, 11911, 69, 13, 15895, 8, 8628, 9, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
CSS Space btw 2 paragraphs not working === On my website http://goo.gl/Pluy2 if you look at page "Equipe", I would like some more space between the text "Founder and managing director" and the text below. I tried "margin bottom" but doesn't seem to be working (note: a "br" would be too much space) Any suggestion? Many thanks, Greg Html code: <div class="equipe-bio"> <img src="images/avatar-man.png" width="80" height="80" alt="Picture" /> <p><span class="bioname">Gregory Yrogerg</span></p> <p><span class="biotitle">Founder and managing director</span></p> <p>Originaire de Belgique, Gregory vit depuis plus de 20 années en Norvège. Lorem ipsum dolor sit amet,...</p> </div>
0
[ 2, 272, 18, 18, 726, 334, 38, 499, 172, 20599, 18, 52, 638, 800, 3726, 3726, 27, 51, 2271, 7775, 6903, 16111, 9, 8430, 118, 18527, 93, 135, 100, 42, 361, 35, 2478, 13, 7, 9629, 1664, 7, 15, 31, 83, 101, 109, 91, 726, 128, 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...
zend framework text fields with same namebut with different belongings === I have a problem with zend form, where i need to built a form where field name are same but with different belongings. Here is the input fields that i wanted inside my form. Currently i am getting with straight html but because of this i am missing validation. <input type="text" name="travel_guide_tab[4][title]"> <input type="text" name="travel_guide_tab[4][description]"> <input type="text" name="travel_guide_tab[6][title]"> <input type="text" name="travel_guide_tab[6][description]">
0
[ 2, 10526, 43, 6596, 1854, 2861, 29, 205, 204, 811, 29, 421, 5979, 18, 800, 3726, 3726, 31, 57, 21, 1448, 29, 10526, 43, 505, 15, 113, 31, 376, 20, 392, 21, 505, 113, 575, 204, 50, 205, 47, 29, 421, 5979, 18, 9, 235, 25, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PIE chart using PHP GD Library === Following is the code in which I try to access the values form mysql and with using it I want to create a pie chart which I am unable to create. I used for loop to create access the value form the database and using an identifier to find the first value and used variable to store the previous and next calculated angle. Help needed..... <?php if (isset($_GET['country'])) { $cpassed = $_GET['country']; } else { $cpassed = 'WLD'; } $ic = $_GET['indcode']; $sy = date("Y"); $sy-=11; include ('/dbcon.php'); $data = array(); $datay = array(); $qc = "SELECT * FROM country WHERE countrycode = '$cpassed';"; $rec = mysql_query($qc); $qr = "SELECT * FROM indicator WHERE indicatorcode = '$ic';"; $res = mysql_query($qr); if(($res) && ($rec)) { $Datac= mysql_fetch_array($rec); $Data = mysql_fetch_array($res); $topicid = $Data['topicid']; $indid = $Data['indicatorid']; $couid = $Datac['countryid']; $year = $sy; for ($count=0; $count < 10; $count ++) { $qryear = "SELECT * FROM year WHERE year = '$year';"; $resy = mysql_query($qryear); $dyear = mysql_fetch_array($resy); $yearid = $dyear['yearid']; if ($resy) { $qrdb = "SELECT * FROM databank WHERE topicid = '$topicid' and indicatorid = '$indid' and countryid = '$couid' and yearid = '$yearid';"; $result = mysql_query($qrdb); if ($result) { $DDB = mysql_fetch_array($result); $data[$count] = $DDB['value']; $datay[$count] = $year; $year++; } else { echo "Data cannot be fetched form Databank"; } } else { echo "Year cannot be fetched from YearDB"; } } } else { echo "MYSQL query Fail"; } $tv = count($data); $x_max=500; $y_max=300; $im = imagecreate ($x_max, $y_max) or die ("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate ($im, 234, 234, 234); $red = imagecolorallocate ($im, 233, 14, 91); $black = imagecolorallocate ($im,25,25,25); $gray = imagecolorallocate($im,200,200,200); imagecolortransparent($im, $background_color); $font = 'arial.ttf'; $gt; for ($i = 0; $i < $tv; $i++) { $gt+=$data[$i]; } echo $gt."<br>"; $fit= 1; $lastangle; $angle; for ($i = 0; $i < $tv; $i++) { if ($fit = 1) { $lastangle = 0; } if ($fit = 1) { $angle = round (360 * $data[$i] / $gt); } else { $angle = round (360 * $data[$i] / $gt); $angle +=$lastangle; } echo $angle."<br>"; imagefilledarc($im, 50, 50, 100, 50, $lastangle, $angle , $red, IMG_ARC_PIE); $lastangle += $angle; echo $lastangle."<br>"; $first_one = 0; } header("Content-type: image/png"); imagepng($im); imagedestroy($im); ?>
0
[ 2, 5470, 1795, 568, 13, 26120, 489, 43, 1248, 800, 3726, 3726, 249, 25, 14, 1797, 19, 56, 31, 1131, 20, 1381, 14, 4070, 505, 51, 18, 22402, 17, 29, 568, 32, 31, 259, 20, 1600, 21, 5470, 1795, 56, 31, 589, 2343, 20, 1600, 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...
Solution needed with a homework - C# === I am learning C# atm and trying to solve one of the problems discribed in my book. Write a program that calculate and prints (accuracy of 0.001) the sequence 1 + 1/2 - 1/3 + 1/4 - 1/5 + .... I know that this is a common problem, but yet i lost almost a whole day to solve it and yet i can't do it alone (maybe i am not trying hard enough). static void Main() { double sum = 0D; double sum1 = 0d; int i = 1; while ( i <100) { i++; if (i % 2 == 0) { sum1 = sum1 +(1 / i); } else { sum1 = sum1 -(1 / i); } sum = sum1 + sum; Console.WriteLine(Math.Round(sum, 3)); } } Will be very grateful if u show me where my thinking is wrong. Thanks.
0
[ 2, 4295, 851, 29, 21, 22334, 13, 8, 272, 5910, 800, 3726, 3726, 31, 589, 2477, 272, 5910, 35, 79, 17, 749, 20, 8402, 53, 16, 14, 1716, 926, 12543, 43, 19, 51, 360, 9, 2757, 21, 625, 30, 18469, 17, 12202, 13, 5, 1738, 4734, 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...
Move first table cell in a row to be in column N === I'd like to create a `<table>` like this: ||Mo ||Tu ||We ||Th ||Fr ||Sa ||Su || | 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | 9 | 10 | 11 | | 12 | 13 | 14 | 15 | 16 | 17 | 18 | | 19 | 20 | 21 | 22 | 23 | 24 | 25 | | 26 | 27 | 28 | 29 | 30 | 31 | As you can see, it's the days of a month. What bugs me is that I have to stick an empty buffer cell, `<td colspan="N-1">`, before the first day there. Otherwise, the table ends up looking like this: ||Mo ||Tu ||We ||Th ||Fr ||Sa ||Su || | 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | 9 | 10 | 11 | | 12 | 13 | 14 | 15 | 16 | 17 | 18 | | 19 | 20 | 21 | 22 | 23 | 24 | 25 | | 26 | 27 | 28 | 29 | 30 | 31 | Which is obviously wrong. So, is there any way I can make the first table cell of that row start in column N, rather than 1, without needing a buffer cell? ***Note:** I know it's not a huge deal to add that buffer cell, but I'm curious if it's possible to do without. Also the styling would be a bit easier without it as well...*
0
[ 2, 780, 64, 859, 1667, 19, 21, 3131, 20, 44, 19, 4698, 13, 103, 800, 3726, 3726, 31, 22, 43, 101, 20, 1600, 21, 13, 1, 5924, 1, 101, 48, 45, 13, 1, 1293, 13, 1, 2473, 13, 1, 458, 13, 1, 96, 13, 1, 6177, 13, 1, 1229, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Refresh Connection to MySQL DB then go to first record after saving data === I am using Visual Basic 2010 and MySQL database I have textboxes on my form and I was able to display the records from my database by MANUALLY adding my MySQL database on the Datasources, dragged the control on my form and the data were displayed on the textboxes. In other words, data on my MySQL DB are BOUND to my textboxes without using any code. In adding / saving data here is the code that I used (the one that worked for me) Private Sub cmd_add_Click(sender As System.Object, e As System.EventArgs) Handles cmd_add.Click Dim SQLCommand As New MySqlCommand Dim connection As New MySqlConnection("Server = localhost; User Id = root; Password = password; Database = maindb") If cmd_add.Text = "ADD" Then cmd_add.Text = "SAVE" EnableControls() ClearTextboxes() lb_age.Visible = False Else cmd_add.Text = "ADD" lb_age.Visible = True connection.Open() SQLCommand.CommandText = "INSERT INTO maindb.mytable (ACCT_NAME,EMP_NUM) VALUES ('" & tb_acctname.Text & "','" & tb_empnum.Text & "')" SQLCommand.Connection = connection SQLCommand.ExecuteNonQuery() MsgBox("Record Succesfully added") connection.Close() End If End Sub My issue is after the application is done with saving the data, I would need to reload my form so that I would be able to navigate and see the records from my database. If I won't reload, I will just get stuck on the option to click "ADD" command button to add another record. I cannot navigate or do any other stuff. When I press the navigation buttons like "FIRST, PREV, NEXT,LAST" it's not showing any record from my database. How would I resolve this? If my database is bound to the textboxes on my form, why is it that they are not visible after I save the new record eventhough I am connected and using the same database? I am confused. Please help me.
0
[ 2, 24905, 2760, 20, 51, 18, 22402, 13, 9007, 94, 162, 20, 64, 571, 75, 7599, 1054, 800, 3726, 3726, 31, 589, 568, 3458, 2125, 498, 17, 51, 18, 22402, 6018, 31, 57, 1854, 5309, 160, 27, 51, 505, 17, 31, 23, 777, 20, 3042, 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...
problems reading links from email with php regex === I'm having this very weird problem, and I can't seem to figure it out. I have a script that reads an email and grabs a username and a link (or multiple links) from the email and puts it into an array. For some reason, the links keep getting chopped off because a "= " keeps getting added for some reason. When I do a string replace on the email, before i do the regex, it doesn't replace "= ". Any idea what this problem could be?? Here is the sample email: @bill http://techcrunch.com/2012/07/20/kickstarter-flashr-wants-to-make-the-iphones-bezel-a-massive-notification-light/?grcc=88888Z0ZwdgtZ0Z0Z0Z0Z0&grcc2=835637c33f965e6cdd34c87219233711~1342828462249~fca4fa8af1286d8a77f26033fdeed202~510f37324b14c50a5e9121f955fac3fa~1342747216490~0~0~0~0~0~0~0~0~7~3~ When I echo out the body of the message I get: --00248c6a671acfdb9c04c558d753 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable @bill http://techcrunch.com/2012/07/20/kickstarter-flashr-wants-to-make-the-iphon= es-bezel-a-massive-notification-light/?grcc=3D88888Z0ZwdgtZ0Z0Z0Z0Z0&grcc2= =3D835637c33f965e6cdd34c87219233711~1342828462249~fca4fa8af1286d8a77f26033f= deed202~510f37324b14c50a5e9121f955fac3fa~1342747216490~0~0~0~0~0~0~0~0~7~3~ --00248c6a671acfdb9c04c558d753 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable @bill notice the "= " which breaks the link. My regex produces: Array ( [0] => http://techcrunch.com/2012/07/20/kickstarter-flashr-wants-to-make-the-iphon= [1] => http://techcrunch.com/2012/07/2= [2] => http://techcrunch.com/2012= ) When I copy and paste the string and and run it though string replace then it replaces the "= " Any idea what's going on? Thanks
0
[ 2, 1716, 1876, 6271, 37, 8517, 29, 13, 26120, 7953, 1706, 800, 3726, 3726, 31, 22, 79, 452, 48, 253, 5455, 1448, 15, 17, 31, 92, 22, 38, 2260, 20, 1465, 32, 70, 9, 31, 57, 21, 3884, 30, 11137, 40, 8517, 17, 15555, 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...
Getting location of sprite within array cocos2d` === I need to be able to touch a specific moving sprite in my array and perform an action on it. However when I perform my MoveTo action, the sprite location doesn't update. Help! Array: int numbreds = 7; redBirds = [[CCArray alloc] initWithCapacity: numbreds]; for( int i = 1; i<=numbreds; i++){ int xvalue = ((-50*i) + 320); int yvalue= 160; if (i==4) { CCSprite *parrot = [CCSprite spriteWithFile:@"taco.png"]; [birdLayer addChild:parrot]; [self movement]; //the action that moves the array horizontally parrot.position = ccp(xvalue,yvalue); parrot.tag=100; Touch -(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInView:[touch view]]; location = [[CCDirector sharedDirector] convertToGL:location]; CCSprite *mark = (CCSprite *)[birdLayer getChildByTag:100]; if (CGRectContainsPoint([mark boundingBox], location)) { CCLOG(@"YAY!"); } THe problem is that the location of the CCSprite doesn't actually update or move. YAY! only is generated at the origin location of the sprite.
0
[ 2, 1017, 1474, 16, 27902, 363, 7718, 22470, 18, 135, 43, 1, 800, 3726, 3726, 31, 376, 20, 44, 777, 20, 1723, 21, 1903, 1219, 27902, 19, 51, 7718, 17, 2985, 40, 1028, 27, 32, 9, 207, 76, 31, 2985, 51, 780, 262, 1028, 15, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Symmetrical many-to-many in Django admin screen === I have a symmetrical many-to-many relationship in Django class Person(models.Model): id = models.CharField(max_length=32, primary_key=True) first_name = models.CharField(max_length=32) last_name = models.CharField(max_length=32) connections = models.ManyToManyField('self', blank=True) How do I see the connections (i.e. myappname_person_connections) table in the admin screen (not inline but as its own table)? e.g. in admin.py admin.site.register(Person) admin.site.register(???) # what to register for the connections? Thanks
0
[ 2, 22434, 151, 8, 262, 8, 14842, 19, 3857, 14541, 21, 43, 2160, 2324, 800, 3726, 3726, 31, 57, 21, 22434, 151, 8, 262, 8, 14842, 1429, 19, 3857, 14541, 718, 840, 5, 13998, 18, 9, 13998, 6, 45, 4924, 800, 2761, 9, 5433, 1109, 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...
OnClickListener for a custom ListView === This is my first android project so please help I am trying to create an on click listener for my listview. I will have multiple listview so i cannot name my listview as android:id="@id/android:list". Well i can display data but i am not able to implement an onClickListener Method. I dont want to click on the textview or any button in the list view i want to click the whole list view while passing the value to the new activity This is the main activity that starts when the applicaton is launched. public class Db extends Activity { private SQLiteDatabase newDb; DataBaseHelper myDbHelper = new DataBaseHelper(this); public ListAdapter adapter; private ArrayList<String> results = new ArrayList<String>(); public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); openDatabase(); newDb = myDbHelper.getReadableDatabase(); Cursor c = newDb.rawQuery("SELECT _id, organisation, address, postcode FROM shoplist", null); int i_organisation = c.getColumnIndex("organisation"); int i_id = c.getColumnIndex("_id"); int i_address = c.getColumnIndex("address"); int i_postcode = c.getColumnIndex("postcode"); //int count = c.getCount(); //String data[] = new String[count]; //int i= 0; for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) { String i1 = c.getString(c.getColumnIndex("_id")); String i2 = c.getString(c.getColumnIndex("organisation")); String i3 = c.getString(c.getColumnIndex("address")); results.add(i1); //i++; } customAdapter adapter = new customAdapter(getApplicationContext(), R.layout.main, results, results, results); setListAdapter(adapter); } private long inserttodata() { // TODO Auto-generated method stub ContentValues cv = new ContentValues(); cv.put("id", "112"); cv.put("organisation","test" ); return newDb.insert("shoplist", null, cv); } private void openDatabase() { try { myDbHelper.createDataBase(); } catch (IOException ioe) { throw new Error("Unable to create database"); } try { myDbHelper.openDataBase(); } catch (SQLException sqle) { System.out.println("failed to open"); throw sqle; } //String[] columns= new String[]{"_id", "Organisation"}; //cursor = newDb.query("Shop", columns, null, null, null, null, null); } } My database helper class public class DataBaseHelper extends SQLiteOpenHelper{ //The Android's default system path of your application database. private static String DB_PATH = "/data/data/calc.three/databases/"; private static String DB_NAME = "charity.db"; private SQLiteDatabase myDataBase; private final Context myContext; public DataBaseHelper(Context context) { super(context, DB_NAME, null, 1); this.myContext = context; } public void createDataBase() throws IOException{ boolean dbExist = checkDataBase(); if(dbExist){ //do nothing - database already exist }else{ //By calling this method and empty database will be created into the default system path //of your application so we are gonna be able to overwrite that database with our database. this.getReadableDatabase(); try { copyDataBase(); } catch (IOException e) { throw new Error("Error copying database"); } } } /** * Check if the database already exist to avoid re-copying the file each time you open the application. * @return true if it exists, false if it doesn't */ private boolean checkDataBase(){ SQLiteDatabase checkDB = null; try{ String myPath = DB_PATH + DB_NAME; checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY); }catch(SQLiteException e){ //database does't exist yet. } if(checkDB != null){ checkDB.close(); } return checkDB != null ? true : false; } /** * Copies your database from your local assets-folder to the just created empty database in the * system folder, from where it can be accessed and handled. * This is done by transfering bytestream. * */ private void copyDataBase() throws IOException{ //Open your local db as the input stream InputStream myInput = myContext.getAssets().open(DB_NAME); // Path to the just created empty db String outFileName = DB_PATH + DB_NAME; //Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); //transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[2048]; int length; while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } //Close the streams myOutput.flush(); myOutput.close(); myInput.close(); } public void openDataBase() throws SQLException{ //Open the database String myPath = DB_PATH + DB_NAME; SQLiteDatabase.CursorFactory c = null; myDataBase = SQLiteDatabase.openDatabase(myPath, c , SQLiteDatabase.OPEN_READWRITE); } @Override public synchronized void close() { if(myDataBase != null) myDataBase.close(); super.close(); } @Override public void onCreate(SQLiteDatabase db) { } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { }} My custom adapter class public class customAdapter extends ArrayAdapter<String> { static List<String> serialNo = new ArrayList<String>(); static List<String> name = new ArrayList<String>(); static List<String> address = new ArrayList<String>(); Context myContext; public customAdapter(Context context, int resource, List<String> c_serialNo, List<String> c_name, List<String> c_address) { super(context, resource, c_serialNo); myContext = context; serialNo = c_serialNo; name = c_name; address = c_address; } @Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) myContext .getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.custom_list, null); } TextView tv_serialNo = (TextView) v.findViewById(R.id.serialNo); TextView tv_name = (TextView) v.findViewById(R.id.name); TextView tv_address = (TextView) v.findViewById(R.id.address); if (tv_serialNo != null) { tv_serialNo.setText(serialNo.get(position)); } if (tv_name != null) { tv_name.setText(name.get(position)); } if (tv_address!= null) { tv_address.setText(address.get(position)); } return v; }} The main.xml file <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@id/android:list"></ListView> </LinearLayout> The custom_list.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:layout_width="fill_parent" android:layout_height="80dp" > <TextView android:id="@+id/serialNo" android:layout_height="38dp" android:layout_width="40dp" android:padding="1dip" android:gravity="top" android:text="sn" /> <TextView android:id="@+id/name" android:layout_height="38dp" android:layout_width="240dp" android:padding="1dip" android:gravity="top" android:text="name" android:layout_toRightOf="@id/serialNo" /> <ImageButton android:id="@+id/fav" android:layout_width="38dp" android:layout_height="38dp" android:layout_alignParentTop="true" android:layout_toRightOf="@+id/name" android:src="@drawable/ic_launcher" /> <TextView android:id="@+id/address" android:layout_height="40dp" android:layout_width="300dp" android:padding="1dip" android:text="name" android:layout_below="@id/serialNo" /> <ImageView android:id="@+id/source" android:layout_width="40dp" android:layout_height="40dp" android:layout_alignBottom="@+id/address" android:layout_toRightOf="@+id/address" android:src="@drawable/pg" /> </RelativeLayout> </LinearLayout>
0
[ 2, 27, 150, 10129, 13891, 106, 26, 21, 5816, 968, 4725, 800, 3726, 3726, 48, 25, 51, 64, 13005, 669, 86, 2247, 448, 31, 589, 749, 20, 1600, 40, 27, 10840, 21772, 26, 51, 968, 4725, 9, 31, 129, 57, 1886, 968, 4725, 86, 31, 1967...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Parsing XML with Java XPath Query, Error: === I'm trying to learn some XML Parsing here and I've been given some code to start out with. I've done some research into the different API's i'm using and I've gradually been able to debug my code into something I hope will work. I'm trying to parse XML files by hard wiring the XPath Query's into a string variable. I'm also using DocumentBuilderFactory if that helps at all. Anyway, I keep getting this exception: Java.lang.String cannot be cast to org.w3c.dom.Node (I've marked it in the code below). I understand what the errors is. The String Query doesn't seem to agree with the parameters of the "evaluate" method. Just don't know how to fix it. I've tried all sorts of different casts and they aern't working. Something tells me I'm doing something horribly wrong here...please help! PS. I'm sorry my code is a but messy, i'm totally new to parsing, I also know there are some unnecessary imports but I figure I may need them if I make a few changes. Code: import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import org.jaxen.JaxenException; import org.jaxen.dom.DOMXPath; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.w3c.dom.Node; import org.w3c.dom.Element; import org.xml.sax.SAXException; import java.io.File; import java.io.IOException; import java.util.List; public class Parser { public static void main(String[] args) { boolean isNamespaceAware = true; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(isNamespaceAware); DocumentBuilder builder = null; try { builder = dbf.newDocumentBuilder(); } catch (ParserConfigurationException e2) { e2.printStackTrace(); } try { Document workingDocument = builder.parse("C:\\Users\\Brandon\\Job\\XPath\\XPath_Sample_Stuff\\XPath_Objects.xml"); } catch (SAXException e1) { e1.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); } String xPathQuery = "/book/author"; DOMXPath generatedPath; NodeList results = null; try { generatedPath = new DOMXPath(xPathQuery); //Here is the errror results = (NodeList) generatedPath.evaluate(xPathQuery); } catch (JaxenException e) { e.printStackTrace(); } if(results == null) System.err.println("There was an issue processing the xpath, and results were still null."); for (int i=0; i<= results.getLength();i++) { System.out.println(results.item(i)); } } }
0
[ 2, 2017, 18, 68, 23504, 29, 8247, 993, 8353, 25597, 15, 7019, 45, 800, 3726, 3726, 31, 22, 79, 749, 20, 2484, 109, 23504, 2017, 18, 68, 235, 17, 31, 22, 195, 74, 504, 109, 1797, 20, 799, 70, 29, 9, 31, 22, 195, 677, 109, 527...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 change the color of highlighted misspelled word? === In the theme I'm using for vim, the strings are shown in red color but the problem is I have spellcheck on and the misspelled words are also shown in red color. This makes it hard to see what is the mistake until you go to that word and delete any character. I want to make the highlightation of the misspelled word in somewhat lighter then it currently. Say #ff2929. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![You can't see what is the misspelled word][1] [1]: http://i.stack.imgur.com/7QgEp.png
0
[ 2, 184, 20, 753, 14, 1665, 16, 12528, 1501, 14343, 43, 833, 60, 800, 3726, 3726, 19, 14, 3184, 31, 22, 79, 568, 26, 1790, 79, 15, 14, 7887, 50, 1721, 19, 402, 1665, 47, 14, 1448, 25, 31, 57, 4762, 12542, 27, 17, 14, 1501, 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...
Prompt site visitor to like Facebook Page only if they are not already a fan === I would like to (in a non-intrusive way) to ask a visitor of our blog to like our facebook page. The problem is I don't want to show this message to everyone, just non-fans. I've read through this post http://stackoverflow.com/questions/5093398/check-if-user-liked-page and it appears that if you want to know if the user likes your facebook page, you need their permission. My code is currently: FB.api('/me/likes/--mypageid--',{limit: 1}, function(response) { if( response.data ) { if( !isEmpty(response.data) ) console.log('You are a fan!'); else console.log('Not a fan!'); } else { console.log(response); } }); Which always return an error: "An active access token must be used to query information about the current user." I assume this is because I am not passing an access token, but to get this access token i have to ask the user for it, and I don't want any popups on my site. Does anyone have any ideas how to accomplish this, I'm also open to any other suggestions on how to prompt users to like a page non-intrusively. thanks!
0
[ 2, 11443, 4417, 689, 10875, 20, 101, 9090, 2478, 104, 100, 59, 50, 52, 614, 21, 2514, 800, 3726, 3726, 31, 83, 101, 20, 13, 5, 108, 21, 538, 8, 6391, 3403, 1284, 161, 6, 20, 1349, 21, 10875, 16, 318, 8146, 20, 101, 318, 9090, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Verifying unauthorized modifications to website === I made a script that crawls through a domain, and I want it to determine if there were any unauthorized modifications. For static pages I can simply compare to a pre-set hash value, but for dynamic-length pages, what's a good way to check if any significant changes were made? Sorry if it sounds dumb.
0
[ 2, 21012, 68, 25881, 13922, 20, 2271, 800, 3726, 3726, 31, 117, 21, 3884, 30, 12392, 18, 120, 21, 4603, 15, 17, 31, 259, 32, 20, 3746, 100, 80, 46, 186, 25881, 13922, 9, 26, 12038, 4434, 31, 92, 1659, 11590, 20, 21, 782, 8, 35...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
share on facebook photo api new IOS === http://www.raywenderlich.com/77/how-to-post-on-facebook-with-your-iphone-app I found this tutorial to share photos on the facebook wall is perfect however if I change the ID of the facebook api, putting my ID instead of using the MyGrades it does not work, because the Facebook SDK has been updated and is no longer compatible. I get the following message: "Sorry, the application you are using is Facebook integration is misconfigured ......" 've researched about the solution would be to update the facebook api. anyone have a suggestion that works exactly like this example but with the current api? http://www.crocko.com/D880103DB52C4426B1D7331A69CADDE4/FacebookPostTutorial.zip
0
[ 2, 1891, 27, 9090, 3056, 21, 2159, 78, 13, 7760, 800, 3726, 3726, 7775, 6903, 6483, 9, 2787, 5036, 1157, 8945, 9, 960, 118, 4536, 118, 1544, 8, 262, 8, 6962, 8, 218, 8, 6413, 5199, 8, 1410, 8, 4314, 8, 49, 7709, 8, 7753, 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...
What goes into an Eventlet+Gunicorn worker thread? === If I deploy Django using Gunicorn with the Eventlet worker type, and only use one process, what happens under the hood to service the 1000 (by default) worker connections? What parts of Django are copied into each thread? Are any parts copied?
0
[ 2, 98, 1852, 77, 40, 807, 1336, 2430, 4570, 49, 8559, 7444, 9322, 60, 800, 3726, 3726, 100, 31, 17617, 3857, 14541, 568, 1223, 49, 8559, 29, 14, 807, 1336, 7444, 1001, 15, 17, 104, 275, 53, 953, 15, 98, 5531, 131, 14, 6124, 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...
how to host .swf from any page === Is there any way to host a .swf game like bloons tower defence, onto my .aspx page? Can you somehow cache a page containing the .swf file and then play it on that page? Also is it legal to get any .swf file you want and play it on a different page, if you have credited the author? I'm very new to this topic and want to create a website that will search for all avaliable, online games, and then play it on the page of my website. How will I go about this approach? I have thought of creating foreign pages as a string through the WebRequest and WebResponse class, and then searching for the .swf, then downloading it to my server and rehosting it on a page, but that seems too much of a hassle and like it wont work. What way should I use and how should I go about this?
0
[ 2, 184, 20, 2015, 13, 9, 18, 15263, 37, 186, 2478, 800, 3726, 3726, 25, 80, 186, 161, 20, 2015, 21, 13, 9, 18, 15263, 250, 101, 13, 7091, 4710, 1710, 2705, 15, 1204, 51, 13, 9, 472, 306, 396, 2478, 60, 92, 42, 3625, 16522, 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...
Want to remove the remove the whitespcaes , with java built in methods === I have developed an application that read how many files are there in a java package inside the java project and count the line of code in those individual files to for example in a java project if there are 2 packages having 4 individual files then total files read will be 4 and if those 4 files having 10 piece of lines of code in each file then 4*10 is total 40 lines of code in overall project ...below is my piece of code private static int totalLineCount = 0; private static int totalFileScannedCount = 0; public static void main(final String[] args) throws FileNotFoundException { JFileChooser chooser = new JFileChooser(); chooser.setCurrentDirectory(new java.io.File("C:" + File.separator)); chooser.setDialogTitle("FILES ALONG WITH LINE NUMBERS"); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setAcceptAllFileFilterUsed(false); if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { Map<File, Integer> result = new HashMap<File, Integer>(); File directory = new File(chooser.getSelectedFile().getAbsolutePath()); List<File> files = getFileListing(directory); // print out all file names, in the the order of File.compareTo() for (File file : files) { // System.out.println("Directory: " + file); getFileLineCount(result, file); //totalFileScannedCount += result.size(); //saral } System.out.println("*****************************************"); System.out.println("FILE NAME FOLLOWED BY LOC"); System.out.println("*****************************************"); for (Map.Entry<File, Integer> entry : result.entrySet()) { System.out.println(entry.getKey().getAbsolutePath() + " ==> " + entry.getValue()); } System.out.println("*****************************************"); System.out.println("SUM OF FILES SCANNED ==>" + "\t" + totalFileScannedCount); System.out.println("SUM OF ALL THE LINES ==>" + "\t" + totalLineCount); } } public static void getFileLineCount(final Map<File, Integer> result, final File directory) throws FileNotFoundException { File[] files = directory.listFiles(new FilenameFilter() { public boolean accept(final File directory, final String name) { if (name.endsWith(".java")) { return true; } else { return false; } } }); for (File file : files) { if (file.isFile()) { Scanner scanner = new Scanner(new FileReader(file)); int lineCount = 0; totalFileScannedCount ++; //saral try { for (lineCount = 0; scanner.nextLine() != null; lineCount++) { ; } } catch (NoSuchElementException e) { result.put(file, lineCount); totalLineCount += lineCount; } } } } /** * Recursively walk a directory tree and return a List of all Files found; * the List is sorted using File.compareTo(). * * @param aStartingDir * is a valid directory, which can be read. */ static public List<File> getFileListing(final File aStartingDir) throws FileNotFoundException { validateDirectory(aStartingDir); List<File> result = getFileListingNoSort(aStartingDir); Collections.sort(result); return result; } // PRIVATE // static private List<File> getFileListingNoSort(final File aStartingDir) throws FileNotFoundException { List<File> result = new ArrayList<File>(); File[] filesAndDirs = aStartingDir.listFiles(); List<File> filesDirs = Arrays.asList(filesAndDirs); for (File file : filesDirs) { if (file.isDirectory()) { result.add(file); } if (!file.isFile()) { // must be a directory // recursive call! List<File> deeperList = getFileListingNoSort(file); result.addAll(deeperList); } } return result; } /** * Directory is valid if it exists, does not represent a file, and can be * read. */ static private void validateDirectory(final File aDirectory) throws FileNotFoundException { if (aDirectory == null) { throw new IllegalArgumentException("Directory should not be null."); } if (!aDirectory.exists()) { throw new FileNotFoundException("Directory does not exist: " + aDirectory); } if (!aDirectory.isDirectory()) { throw new IllegalArgumentException("Is not a directory: " + aDirectory); } if (!aDirectory.canRead()) { throw new IllegalArgumentException("Directory cannot be read: " + aDirectory); } } but the issue is that it also count the white space lines while calculating the line of code for the individual files , which it should not , please advise what modifications I need to do in my program so that it should not count the white spaces while calculating the line of code for the individual files . The idea that was coming to my mind was just compares the read string with "", and count if not equals to "" (empty) like if(!readString.trim().equals("")) lineCount++
0
[ 2, 259, 20, 4681, 14, 4681, 14, 359, 3401, 19189, 18, 13, 15, 29, 8247, 392, 19, 3195, 800, 3726, 3726, 31, 57, 885, 40, 3010, 30, 1302, 184, 151, 6488, 50, 80, 19, 21, 8247, 6030, 572, 14, 8247, 669, 17, 2468, 14, 293, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Finding a spotlight vector in openGL === I'm trying to find the proper vector for a direction of a spot light I have (I am trying to make it flashlight-like). I want it to face the same direction as the camera is always facing, like you're holding a flashlight out in front of you. I can't seem to find the right directional vector, however. At the moment, I have the light sort of following the front/back movement of the camera, but not the turn angle. In addition, the actual spot is pointed upwards, instead of directly ahead, like I want. I know all the normals of the individual objects are working; I tested just general lighting already. I'll just post code that's relevant to the question. If you really need my whole code, please say so. Light code: float sco=20; // Spot cutoff angle float Exp=0; // Spot exponent float Ambient[] = {0.01*ambient ,0.01*ambient ,0.01*ambient ,1.0}; float Diffuse[] = {0.01*diffuse ,0.01*diffuse ,0.01*diffuse ,1.0}; float Specular[] = {0.01*specular,0.01*specular,0.01*specular,1.0}; // Light direction float Position[] = {Ox+3, 2, Oz,1}; float Direction[] = {Ox+lx, here, Oz+lz, 0}; glLightfv(GL_LIGHT0,GL_AMBIENT ,Ambient); glLightfv(GL_LIGHT0,GL_DIFFUSE ,Diffuse); glLightfv(GL_LIGHT0,GL_SPECULAR,Specular); glLightfv(GL_LIGHT0,GL_POSITION,Position); glLightfv(GL_LIGHT0,GL_SPOT_DIRECTION,Direction); glLightf(GL_LIGHT0,GL_SPOT_CUTOFF,sco); glLightf(GL_LIGHT0,GL_SPOT_EXPONENT,Exp); Camera code: // Camera Values double Ox=0, Oz=0; float Oy=1.0; float angle = 0.0; float lx=0.0,lz=-1.0; float deltaAngle = 0.0; float deltaMove = 0; double here; void computePos(float deltaMove) { Ox += deltaMove * lx * 0.1f; Oz += deltaMove * lz * 0.1f; } void computeDir(float deltaAngle) { angle += deltaAngle; lx = sin(angle); lz = -cos(angle); } void display() { here = 2.0f*Oy; if (deltaMove) computePos(deltaMove); if (deltaAngle) computeDir(deltaAngle); gluLookAt(Ox,2,Oz, Ox+lx, here, Oz+lz, 0,1,0); } void key(unsigned char ch,int x,int y) { // Exit on ESC if (ch == 27) exit(0); // WASD controls else if (ch == 'a' || ch == 'A') deltaAngle = -0.01; else if (ch == 'd' || ch == 'D') deltaAngle = 0.01; else if (ch == 'w' || ch == 'W') { collidefront=collision(1); collidextra=collision(3); if (collideback == 2 && collidextra == 3) { deltaMove = 0; collideback = 0; } else if (collideback == 2) { deltaMove = 0.1; collidefront = 0;} else if (collidefront == 1) deltaMove = 0; else deltaMove = 0.1; } else if (ch == 's' || ch == 'S') { collideback=collision(2); if (collidefront == 1) { deltaMove = -0.3; collidefront = 0; } else if (collideback == 2) deltaMove = 0; else deltaMove = -0.1; } else if ((ch == 'e' || ch == 'E') && here < 4) Oy += 0.01; else if ((ch == 'c' || ch == 'C') && here > .5) Oy -= 0.01; Project(fov,asp,dim); glutPostRedisplay(); } Thank you for your help.
0
[ 2, 3007, 21, 19135, 7497, 19, 368, 8430, 800, 3726, 3726, 31, 22, 79, 749, 20, 477, 14, 4119, 7497, 26, 21, 1400, 16, 21, 1999, 471, 31, 57, 13, 5, 49, 589, 749, 20, 233, 32, 15829, 8, 1403, 6, 9, 31, 259, 32, 20, 276, 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...
How to correctly nandwrite a nanddump'ed dump with oob? === I am struggling on flashing a previous ROM dump of an embedded device in Linux. My previous dump contains oob data. I wrote it with `nandwrite -n -N -o /dev/mtd0 backup.bin`, and then take a ROM dump again. By comparing the old and new ROM dump, I see some un-explainable situation: the last 24 bytes of the oob (ecc bytes) of any empty blocks (filled with 0xFF) is ought to be 0xFF also, but those in the new ROM dump is filled with 0x00, causing later write failures. oob ought to be: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF but for `nandwrite`: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 00000000 00000000 00000000 00000000 00000000 Anyone has any idea why?
0
[ 2, 184, 20, 12044, 5884, 43, 23716, 21, 5884, 8096, 11134, 22, 69, 11424, 29, 635, 4995, 60, 800, 3726, 3726, 31, 589, 7587, 27, 14316, 21, 1158, 8421, 11424, 16, 40, 12138, 3646, 19, 13024, 9, 51, 1158, 11424, 1588, 635, 4995, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Changing Opacity of Super View Strange Effect Causes Strange Opacity Changes on Subviews === I have a superview containing two overlapping subviews (one pink and one green). When changing the opacity of the parent view, the subviews show the overlapping section (even though they are fully opaque). How can I make it so the view as a whole fades out, not the individual subviews. Here is a screen: ![two overlapping views][1] [1]: http://i.stack.imgur.com/IBhtI.png
0
[ 2, 4226, 13, 11490, 5788, 16, 1026, 1418, 2578, 1590, 4047, 2578, 13, 11490, 5788, 1693, 27, 972, 4725, 18, 800, 3726, 3726, 31, 57, 21, 1026, 4725, 3503, 81, 23854, 972, 4725, 18, 13, 5, 849, 3164, 17, 53, 647, 6, 9, 76, 4226, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
ListView's contents scrambled on scroll === So I am having a problem with the different pieces of that make up my ListView. I put them into an ArrayList and use a custom ArrayAdapter to hook up to the ListView, which I have done before so I don't believe there is a problem there. Initially the list seems to have the pieces in the correct order, but then I will scroll down the list and the contents will then load in incorrect order. I then scroll back up and everything is jumbled. Has anyone run into this before? Thanks -Jake
0
[ 2, 968, 4725, 22, 18, 8478, 15089, 27, 12159, 800, 3726, 3726, 86, 31, 589, 452, 21, 1448, 29, 14, 421, 2491, 16, 30, 233, 71, 51, 968, 4725, 9, 31, 442, 105, 77, 40, 7718, 5739, 17, 275, 21, 5816, 7718, 27576, 106, 20, 5559, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, Text Annotations and Ideas === I am very curious to here input from others on a problem I've been contemplating for some time now. Essentially I would like to present a user with a text document and allow him/her to make selections of text and annotate it. Specific to the annotations i aim to achieve the following: 1. Allow users to make a text selection, annotate it, then save the selection and annotation for reference later 2. (UI) Support representing overlapped annotations. For example if the string where: "This is the test sentence for my example test sentence", user1 might have an annotation on "is the test sentence for my example" and user2 might have an annotation on "for my example". 3. Account for a situations where the document's text changes. The annotations would to be updated, if possible. How would you tackle this from a technical perspective? Some ideas I've had are: * Use javascript ranges and store an annotation as a pair of integers something like: (document_start_char, document_end_char). Save this pair in the db. * Alternatively, using JS get the text selected and actually save the full text in the db. (not sure how i would then do overlapping annotations) * Represent overlapped annotations by applying a css style to highlight the text then darken the "stack" of annotations where they overlap. Smallest annotation would always have to be on the top of the "stack". What are your thoughts or areas of improvement? How the *heck* could i support a document's text being updated without breaking all the annotations? thanks!!!
0
[ 2, 8247, 8741, 15, 1854, 40, 1270, 7504, 17, 3478, 800, 3726, 3726, 31, 589, 253, 7686, 20, 235, 6367, 37, 654, 27, 21, 1448, 31, 22, 195, 74, 27412, 26, 109, 85, 130, 9, 7398, 31, 83, 101, 20, 734, 21, 4155, 29, 21, 1854, 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...
ArrayAdapter's getView() method getting called automatically on EditText focus event === I am creating the custom list activity. There are two classes one is having extended ListActivity and other is having ArrayAdapter for that list activity. **Problem 1:** The problem is that while opening the ListActivity screen i have Search box on top of it. When i start the ListActivity it automatically opens the KeyBoard as current focus is on **EditText**. I want to stop that. **Problem 2:** Also when focus goes on EditText the ArrayAdapter's **getView()** method is getting called automatically which is generating the all rows again. I am not getting why it happens so. I am not calling **notifyDataSetchanged()** method also. Still when i focus on EditText then getView() is called automatically. How to prevent it? storelistview.xml: <?xml version="1.0" encoding="UTF-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@color/black" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:focusable="true" android:focusableInTouchMode="true"> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableRow android:id="@+id/tableRow2" android:layout_height="wrap_content" android:gravity="center" android:layout_width="fill_parent" android:background="#919191"> <EditText android:id="@+id/searchText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:width="240dp" android:hint="Search"></EditText> <ImageView android:layout_width="wrap_content" android:src="@drawable/search" android:layout_height="wrap_content" android:id="@+id/searchImage"></ImageView> </TableRow> </TableLayout> <ListView android:id="@+id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <TextView android:id="@+id/android:empty" android:layout_width="fill_parent" android:layout_height="fill_parent" android:textColor="@color/white" android:textSize="14sp" android:gravity="top|center" android:text="No store found.." /></LinearLayout> StoreListView.java: public class StoreListView extends ListActivity { private List<Store> stores = new ArrayList<Store>(); private StoreListRowAdapter rowAdapter; private Runnable fetchStores; private Handler handler = new Handler(); private ImageView searchImage; private EditText searchText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.storelistview); searchText = (EditText) findViewById(R.id.searchText); searchImage = (ImageView) findViewById(R.id.searchImage); searchImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } } }); rowAdapter = new StoreListRowAdapter(this, R.layout.storelistview, stores); setListAdapter(rowAdapter); fetchStores = new Runnable() { @Override public void run() { Store store = new Store(); StoreListAsynTask s = new StoreListAsynTask(); s.execute(store); } }; handler.post(fetchStores); } private Runnable resultThread = new Runnable() { public void run() { rowAdapter.clear(); for (int i = 0; i < stores.size(); i++) { Store bean = stores.get(i); rowAdapter.add(bean); } //rowAdapter.notifyDataSetChanged(); } }; class StoreListAsynTask extends AsyncTask<Store, Void, String> { private Gson gson = new Gson(); private List<Store> storeList; private ProgressDialog m_ProgressDialog = null; @Override protected String doInBackground(Store... params) { return respData; } @Override protected void onPostExecute(String result) { //populate store list stores = storeList; runOnUiThread(resultThread); m_ProgressDialog.dismiss(); } } } StoreListRowAdapter.java : public class StoreListRowAdapter extends ArrayAdapter<Store> { List<Store> stores; public StoreListRowAdapter(Context context, int textViewResourceId, List<Store> stores) { super(context, textViewResourceId, stores); this.stores = stores; } @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; if (view == null) { LayoutInflater vi = (LayoutInflater) getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE); view = vi.inflate(R.layout.storelist_rowview, null); } final Store store = stores.get(position); if (store != null) { LinearLayout storeLogoContainer = (LinearLayout) view.findViewById(R.id.storeLogoContainer); LoaderImageView imageView = new LoaderImageView(getContext(), getContext().getString(R.string.logoUrl), store.getId().getId()); storeLogoContainer.addView(imageView); TextView storeName = (TextView) view.findViewById(R.id.storeName); storeName.setText(store.getStoreName()); } return view; } }
0
[ 2, 7718, 27576, 106, 22, 18, 164, 4725, 5, 6, 2109, 1017, 227, 7499, 27, 9392, 11969, 1776, 807, 800, 3726, 3726, 31, 589, 2936, 14, 5816, 968, 2358, 9, 80, 50, 81, 2684, 53, 25, 452, 1984, 968, 19348, 17, 89, 25, 452, 7718, 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 select last, first row of GROUP BY query in MySQL? === [Using MySQL] There is a table messages that contains data as shown below: Id Name Other_Columns ------------------------- 1 A A1 2 A A2 3 A A3 4 B B1 5 B B2 6 C C1 7 A A4 8 A A5 What query will return the following result? 1 A (A3 - A1) 4 B (B2 - B1) 6 C (C1 - C1) 7 A (A5 - A4)
0
[ 2, 92, 31, 5407, 236, 15, 64, 3131, 16, 214, 34, 25597, 19, 51, 18, 22402, 60, 800, 3726, 3726, 636, 12655, 51, 18, 22402, 500, 80, 25, 21, 859, 7561, 30, 1588, 1054, 28, 1721, 1021, 45, 4924, 204, 89, 1, 716, 4404, 2172, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's the difference between a Python "property" and "attribute"? === I am generally confused about the difference between a "property" and an "attribute", and can't find a great resource to concisely detail the differences.
0
[ 2, 98, 22, 18, 14, 2841, 128, 21, 20059, 13, 7, 10890, 106, 1084, 7, 17, 13, 7, 721, 14755, 7, 60, 800, 3726, 3726, 31, 589, 1469, 4230, 88, 14, 2841, 128, 21, 13, 7, 10890, 106, 1084, 7, 17, 40, 13, 7, 721, 14755, 7, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Creating a list with input from 2 EditText === I am making a app where part of it is a list of the books you have read, with the title and the author in each entry. I have 2 EditText boxes and 1 button. I want to take the title and the author from the boxes when I tap the button and put them in a list entry together. I have the part where it takes the data from the boxes and assigns them each to a variable already, I am just having troubles with the list. Heres the code I have so far: package com.lijap.apps.BookTracker; import android.app.ListActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; public class BooksRead extends ListActivity { Button addbook; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.booksread); addbook = (Button) findViewById(R.id.b_addbook); addbook.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub //called when you press the button String bookName =((EditText) findViewById(R.id.et_title)).getText().toString(); String bookAuthor =((EditText) findViewById(R.id.et_author)).getText().toString(); // do the rest of the job } }); } }
0
[ 2, 2936, 21, 968, 29, 6367, 37, 172, 9392, 11969, 800, 3726, 3726, 31, 589, 544, 21, 4865, 113, 141, 16, 32, 25, 21, 968, 16, 14, 964, 42, 57, 1302, 15, 29, 14, 581, 17, 14, 1314, 19, 206, 2792, 9, 31, 57, 172, 9392, 11969, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
TCP Message framing + recv() [linux]: Good conventions? === I am trying to create a p2p applications on Linux, which I want to run as efficiently as possible. The issue I have is with managing packets. As we know, there may be more than one packet in the recv() buffer at any time, so there is a need to have some kind of message framing system to make sure that multiple packets are not treated as one big packet. So at the moment my packet structure is: (u16int Packet Length):(Packet Data) Which requires two calls to recv(); one to get the packet size, and one to get the packet. There are two main problems with this: 1. A malicious peer could send a packet with a size header of something large, but not send any more data. The application will hang on the second recv(), waiting for data that will never come. 2. Assuming that calling Recv() has a noticeable performance penalty (I actually have no idea, correct me if I am wrong) calling Recv() twice will slow the program down. What is the best way to structure packets/Recieving system for both the best efficiency and stability? How do other applications do it? What do you recommend? Thankyou in advance.
0
[ 2, 13, 38, 7439, 2802, 21244, 2754, 6042, 710, 5, 6, 636, 1226, 7147, 500, 45, 254, 15117, 60, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 351, 135, 306, 3767, 27, 13024, 15, 56, 31, 259, 20, 485, 28, 20519, 28, 938, 9, 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...
Apache Server protocols === Can the Apache Server be configured to use other protocols and not just HTTP/HTTPS ? I think this should be possible by using modules. Any answer is appreciated. Thank you.
0
[ 2, 17140, 8128, 19957, 800, 3726, 3726, 92, 14, 17140, 8128, 44, 28895, 20, 275, 89, 19957, 17, 52, 114, 7775, 118, 21127, 18, 13, 60, 31, 277, 48, 378, 44, 938, 34, 568, 17113, 9, 186, 1623, 25, 13746, 9, 3531, 42, 9, 3, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Set up Drupal 6 replication === I am setting up Drupal with a user that has only SELECT (read) rigths as the database is a SLAVE in a replication. I don't need to use the login or any writing from this client. I want to know what tables should I remove from replication so it will show content. Right now I get a "site offline" probably because it cannot do any writes.
0
[ 2, 309, 71, 15708, 6720, 400, 23841, 800, 3726, 3726, 31, 589, 2697, 71, 15708, 6720, 29, 21, 4155, 30, 63, 104, 5407, 13, 5, 10647, 6, 10960, 96, 18, 28, 14, 6018, 25, 21, 5217, 19, 21, 23841, 9, 31, 221, 22, 38, 376, 20, 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...
AutoCompleteTextView dropdownlist invalidate through ArrayAdapter === I have an ArrayAdapter and ArrayList initialized earlier in program. Using AsynTask, in BackgroundTask I am adding dynamic data from webservices into ArrayList. Everything is working fine. At first time when i enter text in AutoCompleteTextView it searches and shows dropdownlist. But when i search for another text, ArrayAdapter getCount size is 0. Below code, I am doing in postTask.. 1 - setting adapter to autocompleteTextView. 2 - setNotifyonChange to adapter. 3 - autocompletetextview invalidate. Sorry i m fresher to write on stack overflow, code wasn't getting posted so wrote like this, hope reader will understand. I have tried notifyDataSetChanged and notifyDataSetInvalidate; nothing working. Please let me where am i going wrong.
0
[ 2, 3108, 15990, 11969, 4725, 2804, 2968, 5739, 16671, 1373, 120, 7718, 27576, 106, 800, 3726, 3726, 31, 57, 40, 7718, 27576, 106, 17, 7718, 5739, 2104, 1333, 1201, 19, 625, 9, 568, 21, 9507, 38, 20310, 15, 19, 2395, 38, 20310, 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...
Unexpected scope for $(this) in jQuery using each and function === When i execute the following code, i'd expect the same element id to be alerted twice but instead, the first one is correct while the second always show the name of the first element in the set. $("div.someClass").each(function (index) { $(this).click(function () { alert($(this).attr("id")); // Here i get the actually clicked element $.when($("div.someClass").animate({ }, 0)).then(function () { alert($(this).attr("id")); // Here i get the first element in of that class }); }); }); Why is it so? How to resolve it? I have tried passing the name of the element into the function but it didn't work.
0
[ 2, 9380, 9914, 26, 5579, 5, 1565, 6, 19, 487, 8190, 93, 568, 206, 17, 1990, 800, 3726, 3726, 76, 31, 15644, 14, 249, 1797, 15, 31, 22, 43, 4186, 14, 205, 4520, 4924, 20, 44, 24884, 2088, 47, 700, 15, 14, 64, 53, 25, 4456, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why this code isn't working? === this code is used to log into an android application by taking the username and the password from the user and check if they are valid in the data base if they are the user enter the application but it doesn't work and i don't know why? here is the php code: <?php //turn off error reporting error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); //Create fields for the database //server, username, password, database $dbhost = "mysql8.000webhost.com"; $dbuser = "a3399702_hassoba"; $dbpass = "password"; $dbdb = "a3399702_sa3dni"; //connect to mySQL $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("connection error"); //Select the database mysql_select_db($dbdb, $connect)or die("database selection error"); //Retrieve the login details via POST $username = $_POST['username']; $password = $_POST['password']; //Query the table android login $query = mysql_query("SELECT * FROM signup_db WHERE id='$username' AND password='$password'"); //check if there any results returned $num = mysql_num_rows($query); //If a record was found matching the details entered in the query if($num == 1){ //Create a while loop that places the returned data into an array while($list=mysql_fetch_assoc($query)){ //Store the returned data into a variable $output = $list; } //encode the returned data in JSON format Print(json_encode($output)); //close the connection mysql_close(); } ?> here is the jave code : package com.sa3dnishokran; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.Activity; import android.content.Intent; import android.net.ParseException; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class Login extends Activity{ EditText loginid; EditText loginPassword; Button login, signup; String result = null; InputStream is = null; StringBuilder sb=null; String logpass; String id_name; String username; String passw; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.login); loginid = (EditText) findViewById(R.id.etLoginId); loginPassword = (EditText) findViewById(R.id.etLoginPassword); login = (Button) findViewById(R.id.bLogin); signup = (Button) findViewById(R.id.bSignup); signup.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { Intent openStartingPoint = new Intent("com.sa3dnishokran.BEGIN"); startActivity(openStartingPoint); } }); login.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { // TODO Auto-generated method stub username = loginid.getText().toString(); passw = loginPassword.getText().toString(); importdata(username, passw); } private void importdata(String username, String passw) { // TODO Auto-generated method stub ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2); nameValuePairs.add(new BasicNameValuePair("username", username)); nameValuePairs.add(new BasicNameValuePair("password",passw)); this.sendData(nameValuePairs); } private void sendData(ArrayList<NameValuePair> data) { // TODO Auto-generated method stub try { HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://sa3dnishokran.netne.net/login.php"); httppost.setEntity(new UrlEncodedFormEntity(data)); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); is = entity.getContent(); } catch(Exception e) { Log.e("log_tag", "Error: "+e.toString()); } //convert response to string try{ BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8); sb = new StringBuilder(); sb.append(reader.readLine() + "\n"); String line="0"; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } is.close(); result=sb.toString(); }catch(Exception e){ Log.e("log_tag", "Error converting result "+e.toString()); } //paring data try{ JSONArray jArray = new JSONArray(result); JSONObject json_data=null; for(int i=0;i<jArray.length();i++){ json_data = jArray.getJSONObject(i); logpass=json_data.getString("password"); id_name=json_data.getString("id"); } }catch(JSONException e1){ Toast.makeText(getBaseContext(), "Wrong ID or Password", Toast.LENGTH_LONG).show(); }catch (ParseException e1){ e1.printStackTrace(); } if((username.contentEquals(id_name)) & (passw.contentEquals(logpass))) { Intent log = new Intent("com.sa3dnishokran.MENU"); startActivity(log); } } }); } }
1
[ 2, 483, 48, 1797, 2532, 22, 38, 638, 60, 800, 3726, 3726, 48, 1797, 25, 147, 20, 6738, 77, 40, 13005, 3010, 34, 741, 14, 4155, 7259, 17, 14, 20884, 37, 14, 4155, 17, 2631, 100, 59, 50, 7394, 19, 14, 1054, 1000, 100, 59, 50, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Its not call delegate method didReceiveAuthenticationChallenge === - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace { return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]; } - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { NSLog(@"got auth challange"); NSURLCredential *newCredential; newCredential=[NSURLCredential credentialWithUser: (NSString*)@"company//A1234" password:(NSString*)@"apple@999" persistence:NSURLCredentialPersistencePermanent]; [[challenge sender] useCredential:newCredential forAuthenticationChallenge:challenge]; NSLog(@"Auth error: %@",[[challenge error] description]); NSLog(@"Failure count:%d",[challenge previousFailureCount]); } //- (id)initWithProxyHost:(NSString *)host port:(NSInteger)port type:(NSString *)type realm:(NSString *)realm authenticationMethod:(NSString *)authenticationMethod{ // // return self; //} I am using this method for accessing the public url from proxy network but its not calling didReceiveAuthenticationChallenge.
0
[ 2, 82, 52, 645, 11300, 2109, 144, 99, 1105, 1284, 1346, 2504, 1786, 857, 27808, 800, 3726, 3726, 13, 8, 13, 5, 1192, 1823, 6, 25996, 872, 45, 5, 103, 4082, 255, 25996, 872, 1637, 6, 25996, 872, 92, 1346, 2504, 1786, 1373, 24559, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 does my drop down-menu work on my local server but not when I push to heroku? === When I test my site locally it works fine, but once I push to heroku the drop down menu doesn't work. my application.js file contains this: //= require bootstrap //= require jquery //= require jquery_ujs //= require_tree . my application.html.erb file contains this <!DOCTYPE html> <html> <head> <title> <%= full_title(yield(:title)) %> </title> <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> <%= csrf_meta_tags %> <%= render 'layouts/shim' %> </head> <body> <%= render 'layouts/header' %> <div class="container"> <%= yield %> </div> </body> </html> my header partial which is where the drop down menus are, contains this <header class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <ul class="nav pull-left"> <li> <%= link_to image_tag("WML_header2.png", :alt => 'Wheres My Lan'), home_path%> </li> </ul> <nav> <ul class="nav pull-right"> </br> <li><%= link_to "Heat Map", heatMap_path %></li> <% if signed_in? %> <li><%= link_to "New Update", new_message_path %></li> <li id="fat-menu" class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> View <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><%= link_to "Users", users_path %></li> <li><%= link_to "Reports", reports_path %></li> <li><%= link_to "Statistics", stats_path %></li> </ul> </li> <li id="fat-menu" class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> Account <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><%= link_to "Profile", current_user %></li> <li><%= link_to "Settings", settings_path %></li> <li class="divider"></li> <li> <%= link_to "Sign out", signout_path, method: "delete" %> </li> </ul> </li> <% else %> <li><%= link_to "Admin sign in", signin_path %></li> <% end %> <li><%= link_to "About", about_path %></li> <li><%= link_to "Contact", contact_path %></li> </ul> </nav> </div> </div> </header>
0
[ 2, 483, 630, 51, 2804, 125, 8, 755, 291, 170, 27, 51, 375, 8128, 47, 52, 76, 31, 3250, 20, 36, 9266, 60, 800, 3726, 3726, 76, 31, 1289, 51, 689, 6680, 32, 693, 1123, 15, 47, 382, 31, 3250, 20, 36, 9266, 14, 2804, 125, 11379,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
SQLite file created by Core Data shows no schema === I've created a new iOS project using the master/detail template. The inserted list entries are stored between app restarts, so there must be a schema and data in the created SQLite database. But no matter how many items I insert something, that file (`~/Library/Application Support/iPhone Simulator/5.1/Applications/<GUID>/Documents/listtest.sqlite`) keeps the original size and has no schema (using `.schema` command of sqlite3). So where's the actual database?
0
[ 2, 4444, 10601, 3893, 679, 34, 2884, 1054, 1285, 90, 23874, 800, 3726, 3726, 31, 22, 195, 679, 21, 78, 13, 7760, 669, 568, 14, 1129, 118, 546, 8682, 22894, 9, 14, 14215, 968, 11399, 50, 8214, 128, 4865, 22767, 18, 15, 86, 80, 49...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Analytics plugin PhoneGap onclick === Anyone have any thoughts on why this is working as an onclick event in Android, but not iOS? I'm using Cordova 1.8.1 jQueryMobile 1.1.1 and jQuery 1.7 if that helps. I have in onDeviceReady: var googleAnalytics = window.plugins.googleAnalyticsPlugin; googleAnalytics.startTrackerWithAccountID("UA-MyCode"); googleAnalytics.trackPageview('/MobileiOS'); Which is working and I see in Analytics. After <body onload="onLoad()"> I have a button that navigates correctly to a page and also has onclick="googleAnalytics.trackPageview('/TestMobileiOS');" Nothing in Analytics. onLoad has: function onLoad(){ document.addEventListener("deviceready", onDeviceReady, false); } Thanks for any help.
0
[ 2, 8144, 26320, 10922, 108, 1132, 1136, 306, 27, 150, 10129, 800, 3726, 3726, 1276, 57, 186, 3064, 27, 483, 48, 25, 638, 28, 40, 27, 150, 10129, 807, 19, 13005, 15, 47, 52, 13, 7760, 60, 31, 22, 79, 568, 5429, 3496, 137, 9, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Django South remove null during migration error due to constraint === Let me begin by saying I read the tutorial on datamigration. I did everything and everything works till the last bit where, I need to remove null=True, blank=True from a ForeignKey field in the new Model and the only way to do it is to specify a default ID of a valid FK ID. However, the problem arise when the ID exist on my dev machine is different on the Staging or Production server. Anyways to work around it other than to make sure the FK ID exist on all the machine or leave it null=True? This is a PostgreSQL issue... Just looking for some solutions... Cheers, Mickey
0
[ 2, 3857, 14541, 180, 4681, 16203, 112, 8443, 7019, 397, 20, 28804, 800, 3726, 3726, 408, 55, 2348, 34, 1148, 31, 1302, 14, 29724, 27, 1054, 10183, 5946, 9, 31, 144, 796, 17, 796, 693, 3924, 14, 236, 1142, 113, 15, 31, 376, 20, 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...
Reporting operations per time interval in C# === I have a series of events which may number several hundred per second at peak times. I want to be able to track and report the number of events per interval (e.g. last 5 minutes, last hour, last 24 hours, last 7 days). What's are some options for tracking this type of data in C#
0
[ 2, 6670, 1311, 416, 85, 14422, 19, 272, 5910, 800, 3726, 3726, 31, 57, 21, 231, 16, 963, 56, 123, 234, 238, 1874, 416, 153, 35, 3059, 436, 9, 31, 259, 20, 44, 777, 20, 792, 17, 1330, 14, 234, 16, 963, 416, 14422, 13, 5, 62, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 - Authentication issues on a Facebook Canvas App using mod_rewrite === I have a Facebook Canvas app that works with ids ?id= and I wanted to make the urls look a bit nicer so I added this to my htaccess file. RewriteEngine On RewriteRule ^u(.*?)\.php$ index.php?id=$1 This is the Login url for facebook $facebook->getLoginUrl(array('canvas' => 1, 'scope' => 'permissions', 'redirect_uri' => 'http://domain.com/u'.$id.'.php')); So it goes to u123456789.php after authenticating. Now my problem is that $facebook->getUser(); always returns 0 even if the user has authenticated and allowed the app because of that redirect. If I redirect to index.php after authenticating it works fine. I think this is caused by the session or something. Is there any solution to make it work? Thanks in advance
0
[ 2, 13, 26120, 13, 8, 27963, 1549, 27, 21, 9090, 9696, 4865, 568, 7226, 1, 99, 23716, 800, 3726, 3726, 31, 57, 21, 9090, 9696, 4865, 30, 693, 29, 13, 9178, 13, 60, 1340, 3726, 17, 31, 417, 20, 233, 14, 13, 911, 7532, 361, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Doctrine2 custom uniqueness in slugs === I'm trying to make unique url slugs for an entity called Page. The slugs should only be unique over Pages related to a Site. So url slugs for pages {site1.com/about, site2.com/about} are unique enough to identify the page. Having pages unique over all sites would be unappealing: site3.com/about-21 is weird. I tried to do this with DoctrineExtensions sluggable, but got the suggestion [to write][1] something custom. Below is my first attempt. Because I can't get the EntityManager in the Entity, I'm having trouble getting the other slugs to check if they're unique. Any suggestions? /** * Slugify Title. To "re-slugify", set titleSlug to empty * @ORM\PrePersist */ public function slugifyTitle($override = false) { // We only slugify is titleSlug is empty if (empty($this->titleSlug) or $override) { if (!empty($this->title)) { // Title not empty? slugify the title. SluggableListener line 220 $slug = Urlizer::transliterate($this->title); } else { // Title empty? make a slug based on the classname $slug = get_class($this); } $this->titleSlug = Urlizer::urlize($slug); $this->titleSlug = $this->uniqueify($this->titleSlug); echo $this->titleSlug; }; } /** * Make the string unique in the domain of: This site, this pagetype */ public function uniqueify($someSlug) { //return $someSlug . rand(); // FIXME :-) $em = $this->get('doctrine')->getEntityManager(); $pageType = get_class($this); $query = $em->createQuery("SELECT slug FROM Powma\ServiceBundle\Entity\$pageType pt"); $slugs = $query->getResult(); // find a unique one. } [1]: https://github.com/l3pp4rd/DoctrineExtensions/issues/410
0
[ 2, 7521, 135, 5816, 2619, 720, 19, 15850, 18, 800, 3726, 3726, 31, 22, 79, 749, 20, 233, 2619, 287, 6362, 15850, 18, 26, 40, 9252, 227, 2478, 9, 14, 15850, 18, 378, 104, 44, 2619, 84, 4434, 1597, 20, 21, 689, 9, 86, 287, 6362,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
EditorFor template Model is null in code block === I'm trying to render a partial view within my editorFor view, and I need to pass some data to it, so I'm creating an object containing values from the parent Model. @model Common.RequiredAddress @{ var countryModel = new Models.CountryModel() { HtmlItemId = ViewData.TemplateInfo.HtmlFieldPrefix + "_Country", SelectedCountry = Model.Country }; } But when this is rendered, I get the NullReferenceException on Model. Why would this be? The Intellisense recognizes the Model.Country value, but at runtime, it's null. I'm able to render other editorFor's within this view just fine by using @Html.EditorFor(model => model.City) Thank you
0
[ 2, 1835, 1106, 22894, 1061, 25, 16203, 19, 1797, 1921, 800, 3726, 3726, 31, 22, 79, 749, 20, 16535, 21, 7284, 1418, 363, 51, 1835, 1106, 1418, 15, 17, 31, 376, 20, 1477, 109, 1054, 20, 32, 15, 86, 31, 22, 79, 2936, 40, 3095, 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...
NSMutableURLRequest: Uploading a file using setHTTPBodyStream rather than setHTTPBody === I currently am uploading files via HTTP Post, using `[body appendData: [NSData dataWithData:data]];` where data is my NSMutableData representation of the file. // Set content type to be form data NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary]; [request addValue:contentType forHTTPHeaderField:@"Content-Type"]; // Set content type to be form data NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary]; [request addValue:contentType forHTTPHeaderField:@"Content-Type"]; // Set up web request with HTTP post headers for 1 form field which is the image NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"userfile\"; filename=\".jpg\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding: NSUTF8StringEncoding]]; [body appendData: [NSData dataWithData:data]]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding: NSUTF8StringEncoding]]; // Set the body [request setHTTPBody: body]; Due to memory limitations, I have read that its best to upload using `setHTTPBodyStream` and passing in the location of the file on disk - how would I go about setting other attributes such as the content disposition using this method?
0
[ 2, 13, 2172, 7903, 579, 911, 255, 99, 10351, 45, 71, 16866, 21, 3893, 568, 309, 21127, 9760, 11260, 864, 119, 309, 21127, 9760, 800, 3726, 3726, 31, 871, 589, 71, 16866, 6488, 1197, 7775, 678, 15, 568, 13, 1, 2558, 9760, 4865, 245...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Creating a polygon around a linestring with PostGIS === I am new to PostGIS and need to ask for some help here. I have a polyline from google maps (representing an itinerary) and need to build a polygon (buffer) around it with a specific distance in meters or kilometers. For input, I have the list of Latitude/Longitude points and the required buffer distance. Can anyone help me build the query so that the returned result is the polygon in Latitude/Longitude coordinates, ready to be plotted on the map ?
0
[ 2, 2936, 21, 21309, 140, 21, 293, 11130, 29, 678, 12469, 800, 3726, 3726, 31, 589, 78, 20, 678, 12469, 17, 376, 20, 1349, 26, 109, 448, 235, 9, 31, 57, 21, 3446, 1143, 37, 8144, 6867, 13, 5, 27752, 40, 32, 14554, 1857, 6, 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...
Unable to show image of OpenCV/sample/cpp/lkdemo.cpp added with warpPerspective functionality === Hi I have tried to modify the lkdemo.cpp in OpenCV/sample/cpp. I want to get perspective transform and then warp Perspective. So I have added line (1) and (2) to do that. Where declaration for image and output are as follows: Mat gray, prevGray, image, output; .... calcOpticalFlowPyrLK(prevGray, gray, points[0], points[1], status, err, winSize, 3, termcrit, 0, 0.001); (1) CvMat H = getPerspectiveTransform(points[0], points[1]); (2) cvWarpPerspective(&image, &output, &H,CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, cvScalarAll(0)); ... Now when I try to see the output of warp image using imshow() then getting this error. error: (-206) Unrecognized or unsupported array type in function cvGetMat backtrace after debugging is as follows: (gdb) bt #0 0xb7fdd424 in __kernel_vsyscall () #1 0xb77741ef in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb7777835 in __GI_abort () at abort.c:91 #3 0xb79e313d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #4 0xb79e0ed3 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #5 0xb79e0f0f in std::terminate() () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #6 0xb79e105e in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #7 0xb7eb9363 in cv::error(cv::Exception const&) () from /usr/local/lib/libopencv_core.so.2.4 #8 0xb7e40496 in cvGetMat () from /usr/local/lib/libopencv_core.so.2.4 #9 0xb7ceb915 in cvImageWidgetSetImage(_CvImageWidget*, void const*) () from /usr/local/lib/libopencv_highgui.so.2.4 #10 0xb7ced4e0 in cvShowImage () from /usr/local/lib/libopencv_highgui.so.2.4 #11 0xb7cea378 in cv::imshow(std::string const&, cv::_InputArray const&) () from /usr/local/lib/libopencv_highgui.so.2.4 #12 0x0804a1ca in main (argc=2, argv=0xbffff724) at lkdemo-1.cpp:141 (gdb) Please anyone help me to fix this. ....
0
[ 2, 2343, 20, 298, 1961, 16, 368, 12732, 118, 6101, 5106, 118, 150, 3421, 118, 9093, 19274, 9, 150, 3421, 905, 29, 176, 8763, 7350, 1284, 18548, 800, 3726, 3726, 4148, 31, 57, 794, 20, 17579, 14, 13, 9093, 19274, 9, 150, 3421, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
the if statement in TCL === I have a question about if statement in tcl of the following code: if {(($number == 1)&&($name == "hello")) || (($number == 0)&&($name == "yes"))} { #do something here } the code above works, but if I wrote it down like this: if {{$number == 1 && $name == "hello"} || {$number == 0&&$name == "yes"}} { #do something here } it complain that the $number is expected to be a boolean, why? the second one is not a vaild expression? and how to correct it?
0
[ 2, 14, 100, 3331, 19, 13, 38, 5316, 800, 3726, 3726, 31, 57, 21, 1301, 88, 100, 3331, 19, 13, 38, 5316, 16, 14, 249, 1797, 45, 100, 13, 1, 5, 5, 4403, 16299, 800, 3726, 137, 6, 1569, 1569, 5, 4403, 7259, 800, 3726, 13, 7, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Cocoa binding direct access to values === I use Cocoa binding (Shared User Defaults Controller) to bind values and enableness of some interface controls. Is there any possibility to get value of this values? Of course I can get them through defining my controls as outlets and then just get them properties, but it is very difficult because I have a lot of such controls and anywhere I need to access my values I need my NIB instance.
0
[ 2, 24507, 8728, 1744, 1381, 20, 4070, 800, 3726, 3726, 31, 275, 24507, 8728, 13, 5, 16608, 43, 4155, 12838, 18, 9919, 6, 20, 10193, 4070, 17, 9240, 720, 16, 109, 6573, 8671, 9, 25, 80, 186, 4813, 20, 164, 1923, 16, 48, 4070, 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...
How to use search:search API to search in txt file? === How to search within a text file(.txt) with search:search API in Marklogic. I want to upload a txt file to Marklogic and use search:search API to search its contents. How can I do it ?
0
[ 2, 184, 20, 275, 2122, 45, 25136, 21, 2159, 20, 2122, 19, 20225, 38, 3893, 60, 800, 3726, 3726, 184, 20, 2122, 363, 21, 1854, 3893, 5, 9, 38, 396, 38, 6, 29, 2122, 45, 25136, 21, 2159, 19, 943, 24268, 9, 31, 259, 20, 71, 829...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Dialog with resize minimize or Frame depending on parent === I would like to have a window that behaves like a Dialog, in the terms, that it closes with the parent window, however it shall behave like a normal Frame, especially it shall have the maximize/restore button. How can I create windows, that are bound to a parent window (they close when the parent is closed) and inherit some properties, i.e. the windowicon? The best I can think off is writing my own class wich wraps a JFrame and takes a parent. This class installs a Listener to the parent and keeps track of all its instances, so it can close all instances when the parent is closed. Exit_on_close can not be used for the parent, since there is a rest of the application which is supposed to keep running. So is there a an easy way, or do I have to roll my own class?
0
[ 2, 28223, 29, 302, 10454, 16713, 54, 3523, 4758, 27, 4766, 800, 3726, 3726, 31, 83, 101, 20, 57, 21, 1463, 30, 14149, 18, 101, 21, 28223, 15, 19, 14, 1663, 15, 30, 32, 543, 18, 29, 14, 4766, 1463, 15, 207, 32, 3004, 14149, 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...
find matching array and return the key using php === I have an array like this: Array ( [2] => Array ( [0] => name2 surname [1] => email2@email.com [2] => 834502034 [3] => image url3 ) [3] => Array ( [0] => name3 surname [1] => email2@email.com [2] => 7648484886 [3] => image url3 ) [0] => Array ( [0] => name0 surname [1] => email0@email.com [2] => 56783658658 [3] => image url0 ) [1] => Array ( [0] => name1 surname [1] => email1@email.com [2] => 7648484886 [3] => image url1 ) ) youll notice that some of the values are the same and may only have a single difference in value. I need to find out if another single array matches any on of the sub arrays and return the key. the array I would match against is not multidimensional: Array ( [0] => name1 surname [1] => email1@email.com [2] => 7648484886 [3] => image url1 ) How do I find out if my single array is found within the main array and return the KEY? Ive tried using array_diff_uassoc with a callback which returns the non matching key => array and I guess I could then match the count of both results to see if there is a difference, but I still need the key of the matched array. The array I am comparing against will always have the exact values [0],[1],[2] and [3].
0
[ 2, 477, 10120, 7718, 17, 788, 14, 1246, 568, 13, 26120, 800, 3726, 3726, 31, 57, 40, 7718, 101, 48, 45, 7718, 13, 5, 636, 135, 500, 800, 1, 7718, 13, 5, 636, 387, 500, 800, 1, 204, 135, 11311, 636, 165, 500, 800, 1, 8517, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android/ Web App - Setting orientation to portrait mode from landscape === I have a app which I have built in PhoneGap and within the Android Manifest file I have set the orientation to landscape, as my app is required to be in landscape mode at all time. The issue I have is that I have a few external links, which load up in the default phone browser, however due to the fact that the phone is being held in landscape mode the page loads in landscape mode, which then does not fit all the content properly. So my question is whether there is a way to set the orientation to automatically change to portrait when the external link is clicked. I am currently loading the external page within my javascript using: window.location.href = "http://www.test.com"; Thanks in advance,
0
[ 2, 13005, 118, 2741, 4865, 13, 8, 2697, 10245, 20, 5548, 3740, 37, 4453, 800, 3726, 3726, 31, 57, 21, 4865, 56, 31, 57, 392, 19, 1132, 1136, 306, 17, 363, 14, 13005, 13160, 3893, 31, 57, 309, 14, 10245, 20, 4453, 15, 28, 51, 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 call a sql variable in javascript selected by html onchange, canned response function === What i want to be able to do is: --- have an "on change" on drop list (containing the table data "titles") --- this on change runs the javascript function --- the javascript populates the text area with a "message" column of data in the same table as the corresponding title that is being selected in the drop list. <li><label for="frm_precan">Canned Response</label> <span class="input"> <select id="frm_precan" name="precan" onchange="updateText();"> <option value="">--Please Select--</option> <?php foreach($precan_list as $precan) : ?> <option value="<?=$precan['id'];?>"><?=$precan['name'];?></option> <?php endforeach; ?> </select> </span> </li> </ul> <textarea style="width: 100%; margin: 0; padding: 0; border-width: 1; font-family: courier;" name="message" rows="10" id="text_area"></textarea> <script type="text/javascript"> function updateText() { var value = $("#frm_precan option:selected").text(); $('#text_area').val(value);; } </script> this is the code, and it currently can put the selected title in the text area, however i feel something clever with SQL is required to select the row of data from the table WHERE id or name
0
[ 2, 184, 20, 645, 21, 4444, 255, 7612, 19, 8247, 8741, 1704, 34, 13, 15895, 27, 16229, 15, 92, 3725, 1627, 1990, 800, 3726, 3726, 98, 31, 259, 20, 44, 777, 20, 107, 25, 45, 13, 8, 8, 8, 57, 40, 13, 7, 218, 753, 7, 27, 2804,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
sn.exe fails with Access Denied error message === I get an Access is Denied error message when I use the strong name tool to create a new key to sign a .NET assembly. This works just fine on a Windows XP machine but it does not work on my Vista machine. PS C:\users\brian\Dev\Projects\BELib\BELib> sn -k keypair.snk Microsoft (R) .NET Framework Strong Name Utility Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. Failed to generate a strong name key pair -- Access is denied. What causes this problem and how can I fix it?
0
[ 2, 8912, 9, 1706, 62, 13614, 29, 1381, 5265, 7019, 2802, 800, 3726, 3726, 31, 164, 40, 1381, 25, 5265, 7019, 2802, 76, 31, 275, 14, 966, 204, 5607, 20, 1600, 21, 78, 1246, 20, 1676, 21, 13, 9, 2328, 1475, 9, 48, 693, 114, 1123...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Bind an interface in java TCP connection === I have two interfaces in a solaris host. I would like to initiate two TCP connections to a single TCP server via both interfaces as shown in the diagram. Are there any options in Java to bind the interface to the TCP socket to override the local routing table? thanks,
0
[ 2, 10193, 40, 6573, 19, 8247, 13, 38, 7439, 2760, 800, 3726, 3726, 31, 57, 81, 6573, 18, 19, 21, 4535, 403, 2015, 9, 31, 83, 101, 20, 17014, 81, 13, 38, 7439, 6760, 20, 21, 345, 13, 38, 7439, 8128, 1197, 156, 6573, 18, 28, 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...
Need my own independent Single Sign On solution === I have a couple of domains, dom1.com, dom2.com, on which multiple web apps are running. Authentication is currently via a table of username+hashed_passwords. I would like a sso method (similar to how google accounts work). would SimpleSAMLPHP help ? Also, I am not looking for an OpenID based authentication, I will need to use my own local set of users. Unix/Shared hosting PHP Tried installing SimpleSAML but not sure if that what is applicable
4
[ 2, 376, 51, 258, 1124, 345, 1676, 27, 4295, 800, 3726, 3726, 31, 57, 21, 1335, 16, 15544, 15, 11859, 165, 9, 960, 15, 11859, 135, 9, 960, 15, 27, 56, 1886, 2741, 4865, 18, 50, 946, 9, 27963, 25, 871, 1197, 21, 859, 16, 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...
SQL parameters - scalar varible === Hi i am trying to set a SQL parameter to a decimal, but when i run my code i get an error " must declare the scalar varible @Per_Cent.. the code is below, thanks in advance SqlParameter PerCent = new SqlParameter("@PerCent", SqlDbType.Decimal, 5); PerCent.Value = PerCentV;
0
[ 2, 4444, 255, 12905, 13, 8, 28960, 4033, 3426, 800, 3726, 3726, 4148, 31, 589, 749, 20, 309, 21, 4444, 255, 18906, 20, 21, 26380, 15, 47, 76, 31, 485, 51, 1797, 31, 164, 40, 7019, 13, 7, 491, 10123, 14, 28960, 4033, 3426, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
404 error serving blobstore image python appengine === I have a question about serving/rendering an image saved in the blobstore I get a 404 error It seems to find the url?? http://clockinapple.appspot.com/serve/AMIfv97XybVYJy5Jk1e7WCSfCc-IO7zBtlVaC8ef8-Im /etc/ The code is basically the same as the example - any help greatly appreciated This is my handler code: class ServeHandler(blobstore_handlers.BlobstoreDownloadHandler): def get(self, resource): resource = unicode(str(urllib.unquote(resource))) blob_info = blobstore.BlobInfo.get(resource) self.send_blob(blob_info) class GetBlobstoreUrl(BaseHandler): def get(self): upload_url = blobstore.create_upload_url('/upload/') self.response.out.write(upload_url) class UploadHandler(blobstore_handlers.BlobstoreUploadHandler): def post(self): upload_files = self.get_uploads('file') blob_info = upload_files[0] user_info = blobstore.BlobInfo.all().get().filename text = user_info head, sep, tail = text.partition('.') user_info = head photo = clockin.UserPhoto(blob_key=blob_info.key(), employee=user_info) photo.put() class GetLogs(BaseHandler): def get(self): logs = clockin.UserPhoto.all() params = {'logs': logs} return self.render_template('logs.html', **params) This is my model code: class UserPhoto(db.Model): employee = db.StringProperty(db.Key) blob_key = blobstore.BlobReferenceProperty() create_timestamp = db.DateTimeProperty(auto_now_add=True) update_timestamp = db.DateTimeProperty(auto_now=True) My routes: RedirectRoute('/serve/([^/]+)?', ServeHandler, name='serve_handler', strict_slash=True), RedirectRoute('/logs/', GetLogs, name='get_logs', strict_slash=True), RedirectRoute('/get_blobstore_url/', GetBlobstoreUrl, name='get_blobstore_url', strict_slash=True), How I serve the html: (us is the instance) <td><img src='/serve/{{us.blob_key.key()}}'></img></td>
0
[ 2, 13, 23397, 7019, 1799, 334, 10904, 16828, 1961, 20059, 4865, 16847, 800, 3726, 3726, 31, 57, 21, 1301, 88, 1799, 118, 99, 16706, 68, 40, 1961, 4377, 19, 14, 334, 10904, 16828, 31, 164, 21, 13, 23397, 7019, 32, 2206, 20, 477, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to search in redis for hash keys? === I'm using hash keys to store user details like: hmset user:1 user_name lee age 21 hmset user:2 user_name david age 25 hmset user:3 user_name chris age 25 I need to search for users having age = 25, name = lee. How to do a search for a specified value in a given field.
0
[ 2, 184, 20, 2122, 19, 402, 403, 26, 19170, 5534, 60, 800, 3726, 3726, 31, 22, 79, 568, 19170, 5534, 20, 1718, 4155, 3289, 101, 45, 6451, 1198, 4155, 45, 165, 4155, 1, 7259, 1358, 348, 852, 6451, 1198, 4155, 45, 135, 4155, 1, 725...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to Create Relationship Between Contact and Account SugarCRM javascript === Hi can somebody help me? I am new in programing with Javascript and I need to set a Contact to Account Relationship. function SetRelationContact_Account(){ $.get(CurrentServerAddress + '/service/v2/rest.php', { method: "set_relationship", input_type: "JSON", response_type: "JSON", rest_data: '{"session":"' + SugarSessionId + '","module_name":"Contacts","module_id":"' + CurrentContactId + '","link_field_name":"accounts","related_ids":["session":"' + SugarSessionId + '"]}' }, function(data) { if (data !== undefined) { var addAccountResult = jQuery.parseJSON(data); } }); }
0
[ 2, 184, 20, 1600, 1429, 128, 2203, 17, 2176, 4200, 6711, 79, 8247, 8741, 800, 3726, 3726, 4148, 92, 8861, 448, 55, 60, 31, 589, 78, 19, 625, 68, 29, 8247, 8741, 17, 31, 376, 20, 309, 21, 2203, 20, 2176, 1429, 9, 1990, 309, 99,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Putty server unexpectedly closed network connection === I'm getting this error in Putty: Server unexpectedly closed network connection I think there is a problem with network in my office because all computer in my work have the same problem, besides from the other place that my work i can stable connection without any problems Anyone knows how to fix it?
0
[ 2, 442, 1084, 8128, 16044, 827, 982, 2760, 800, 3726, 3726, 31, 22, 79, 1017, 48, 7019, 19, 442, 1084, 45, 8128, 16044, 827, 982, 2760, 31, 277, 80, 25, 21, 1448, 29, 982, 19, 51, 488, 185, 65, 1428, 19, 51, 170, 57, 14, 205, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Trigger.IO: Including an mp3 file === I'm experiencing a strange behaviour when including an mp3 in the src (or any other sub folder) of a very simple trigger.io project. The first build works fine. On the second build I recieve the following error: (I've added translations for the german stuff) 2012-07-13 12:51:38,017 [ DEBUG] Checking API response for success or error 2012-07-13 12:51:38,131 [ DEBUG] configuration is identical to last run 2012-07-13 12:51:38,131 [ DEBUG] already authenticated - continuing 2012-07-13 12:51:38,131 [ DEBUG] GET https://trigger.io/api/app/69c8695eccc911e1a8c212313d1adcbe/should_rebuild 2012-07-13 12:51:38,394 [ DEBUG] Checking API response for success or error 2012-07-13 12:51:38,394 [ INFO] Configuration is unchanged: using existing templates 2012-07-13 12:51:48,394 [ ERROR] Something went wrong that we didn't expect: 2012-07-13 12:51:48,394 [ ERROR] [Error 183] Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist: 'development' Translation: A file cannot be created if it exists allready: 'development' 2012-07-13 12:51:48,394 [ DEBUG] Traceback (most recent call last): File "C:\Users\asic\forge-tools-3.3.2\forge-tools\forge\async.py", line 96, in run result = self._target(*self._args, **self._kwargs) File "C:\Users\asic\forge-tools-3.3.2\forge-tools\forge\main.py", line 369, in development_build try_a_few_times(move_files_across) File "C:\Users\asic\forge-tools-3.3.2\forge-tools\forge\lib.py", line 25, in try_a_few_times f() File "C:\Users\asic\forge-tools-3.3.2\forge-tools\forge\main.py", line 365, in move_files_across shutil.copytree(defaults.TEMPLATE_DIR, 'development') File "C:\Python27\lib\shutil.py", line 174, in copytree os.makedirs(dst) File "C:\Python27\lib\os.py", line 157, in makedirs mkdir(name, mode) WindowsError: [Error 183] Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist: 'development' Translation: A file cannot be created if it exists allready: 'development' The only way to fix it, is to delete the development folder and build from scratch..
0
[ 2, 7286, 9, 1963, 45, 215, 40, 4628, 240, 3893, 800, 3726, 3726, 31, 22, 79, 15138, 21, 2578, 7727, 76, 215, 40, 4628, 240, 19, 14, 13, 18, 5453, 13, 5, 248, 186, 89, 972, 19294, 6, 16, 21, 253, 1935, 7286, 9, 1963, 669, 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...
Organising asynchronous tasks === I have three tasks A, B, C. B must run before C, but A can run in parallel to both of them. This is logic that has recently changed, and the logic we currently have works fine, I just wondered if there is a better solution to what we currently have: public void RunTasks(...) { Action<IRunnableTask> runner = task => { if (task.ShouldRun(request)) { task.Run(request, response); } }; // run parallel tasks Parallel.ForEach(parallelTasks, runner); // run serial tasks Array.ForEach(serialTasks, runner); } Here, A and B would be parallel tasks, C is in the list of serial tasks. The problem is here that the code will wait for A to finish before C can start, which is unnecessary. So, is there a nice clean solution, or do I need to start putting in callbacks and whatnot?
0
[ 2, 23826, 21, 16023, 1291, 8674, 800, 3726, 3726, 31, 57, 132, 8674, 21, 15, 334, 15, 272, 9, 334, 491, 485, 115, 272, 15, 47, 21, 92, 485, 19, 3821, 20, 156, 16, 105, 9, 48, 25, 7085, 30, 63, 1989, 1015, 15, 17, 14, 7085, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to create,call a pipe? === **I would like to know the followings:** - 1.How to create a pipe in c# - 2.How to call the created pipe from another process. *Thanks*
0
[ 2, 184, 20, 1600, 15, 9200, 21, 7642, 60, 800, 3726, 3726, 13, 1409, 49, 83, 101, 20, 143, 14, 249, 18, 45, 1409, 13, 8, 137, 9, 1544, 20, 1600, 21, 7642, 19, 272, 5910, 13, 8, 172, 9, 1544, 20, 645, 14, 679, 7642, 37, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
mvc3 prompt System.InvalidOperationException === I am using translation from resx files stored in `App_GlobalResources` folder with DataAnnotations in a mvc3 model. It works fine with a `Required DataAnnotation`, but it doesn't work any more if i'm trying to use the `Display DataAnnotation`. Here is my code: [Required(ErrorMessageResourceType = typeof(Resources.Error), ErrorMessageResourceName = "RequiredClientName")] [Display(Prompt = "ClientName", ResourceType = typeof(Resources.Front))] public string Name { get; set; } A `System.InvalidOperationException` is thrown only when I put the `Display DataAnnotation` Here is the full exception(I am sorry, I didn't find a way to translate it in english): > Impossible de récupérer la propriété 'Prompt' en raison de l'échec de > la localisation. Le type 'Resources.Front' n'est pas public ou ne > contient pas une propriété de chaîne statique publique avec le nom > 'FooterAbout'. > > Description : Une exception non gérée s'est produite au moment de > l'exécution de la requête Web actuelle. Contrôlez la trace de la pile > pour plus d'informations sur l'erreur et son origine dans le code. > > Détails de l'exception: System.InvalidOperationException: Impossible > de récupérer la propriété 'Prompt' en raison de l'échec de la > localisation. Le type 'Resources.Front' n'est pas public ou ne > contient pas une propriété de chaîne statique publique avec le nom > 'FooterAbout'. The model I am using is stored in an `Area`. Also, I can access values in my resx files from the `_Layout`, or in the `Required DataAnnotation` Thank you for your help Florent.
0
[ 2, 307, 8990, 240, 11443, 4417, 329, 9, 108, 18506, 43, 11377, 10066, 872, 800, 3726, 3726, 31, 589, 568, 4064, 37, 10719, 396, 6488, 8214, 19, 13, 1, 7753, 1, 26763, 99, 12097, 18, 1, 19294, 29, 1054, 210, 1270, 7504, 19, 21, 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...
Theme inheritance with magento === I am working on a magento website. I have 4 categories, and two of them use an other theme (no my specific magento theme) . How can i configure my theme to get missing files from my default theme instead of the base theme. Thank you
0
[ 2, 3184, 13852, 29, 4723, 17050, 800, 3726, 3726, 31, 589, 638, 27, 21, 4723, 17050, 2271, 9, 31, 57, 268, 6422, 15, 17, 81, 16, 105, 275, 40, 89, 3184, 13, 5, 251, 51, 1903, 4723, 17050, 3184, 6, 13, 9, 184, 92, 31, 1065, 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...
Force the browser to cache a .php === I need the browser to cache a large, mostly static .php file. I open it via ajax and want to add it to the current page. After some research if found [this][1] [1]: http://www.electrictoolbox.com/php-caching-headers/ $seconds_to_cache = 3600; $ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT"; header("Expires: $ts"); header("Pragma: cache"); header("Cache-Control: max-age=$seconds_to_cache"); This works for IE, but not for chrome and firefox. Here is the request Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding gzip, deflate Accept-Language de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Cache-Control max-age=0 Connection keep-alive Content-Type application/x-www-form-urlencoded Cookie PHPSESSID=5dkvr42f4it8pnnnqpesj6l413 Host localhost Referer http://localhost/mifa/Suche.php User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1 charset utf-8 and here the response header Cache-Control max-age=3600 Connection Keep-Alive Content-Type text/html Date Thu, 05 Jul 2012 15:28:22 GMT Expires Thu, 05 Jul 2012 16:28:22 GMT Keep-Alive timeout=5, max=91 Pragma cache Server Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Transfer-Encoding chunked X-Powered-By PHP/5.3.8 What do i need to change?
0
[ 2, 558, 14, 16495, 20, 16522, 21, 13, 9, 26120, 800, 3726, 3726, 31, 376, 14, 16495, 20, 16522, 21, 370, 15, 1555, 12038, 13, 9, 26120, 3893, 9, 31, 368, 32, 1197, 20624, 17, 259, 20, 3547, 32, 20, 14, 866, 2478, 9, 75, 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...
Last column of a table in PDF (iTextSharp) not justified === i generated a pdf starting from an html page usingi iTextSharp. But tables are rendered with the last column not justified, as you can see in the image. What can i do to fix this? Thank you ![table in a pdf code-generated][1] [1]: http://i.stack.imgur.com/ceBit.png
0
[ 2, 236, 4698, 16, 21, 859, 19, 13, 11124, 13, 5, 49, 11969, 23646, 6, 52, 17002, 800, 3726, 3726, 31, 6756, 21, 13, 11124, 1422, 37, 40, 13, 15895, 2478, 568, 49, 31, 11969, 23646, 9, 47, 7484, 50, 10877, 29, 14, 236, 4698, 52...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Center sidebar content in bootstrap === I need to center sidebar content. Here is my layout (which doesn't work): <body> <div class="container-fluid"> <div class="row-fluid"> <div class="span9"> ... </div> <div class="span3"> //sidebar <div class="row-fluid"> <div class="span12 center-block"> //content which should be centered </div> </div> </div> </div> </body> center-block code I have taken [here][1]: .center-block { margin:0 auto; float:none; } [1]: http://stackoverflow.com/questions/9554724/bootstrap-css-center-span7
0
[ 2, 459, 270, 1850, 2331, 19, 5894, 16514, 800, 3726, 3726, 31, 376, 20, 459, 270, 1850, 2331, 9, 235, 25, 51, 9106, 13, 5, 2140, 1437, 22, 38, 170, 6, 45, 13, 1, 9760, 1, 13, 1, 12916, 718, 3726, 7, 1126, 5851, 106, 8, 12848...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 sure JAVA_HOME is correctly set === Pretty new to Java and also to Mac ... I want to make sure JAVA_HOME is set so in other programs I can use its path. So I did some Googling and here is what I got: If I enter **/usr/libexec/java_home** in terminal I get this: **/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home** but if I enter **echo $JAVA_HOME** in terminal, I don't get anything back. Can you please tell me what is going on in here? Thanks.
0
[ 2, 544, 562, 8247, 1, 8167, 25, 12044, 309, 800, 3726, 3726, 1772, 78, 20, 8247, 17, 67, 20, 1572, 13, 9, 9, 9, 31, 259, 20, 233, 562, 8247, 1, 8167, 25, 309, 86, 19, 89, 1726, 31, 92, 275, 82, 2013, 9, 86, 31, 144, 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...
Programatically change price to Ubercart item when added to cart === I have built a Javascript app that provides custom configuration for a product. From that JS app I submit the relevant data to a Drupal module which I've also prepared. The purpose of the module is to validate input and submit the details to the Ubercart system. I need to submit a custom price based on the items chosen from that module when the custom build is submitted from the module. I have looked at uc_variable_price, uc_custom_price and the hook_add_to_cart but I'm not seeing a way to add the custom price programmatically.
0
[ 2, 625, 721, 8438, 753, 2162, 20, 13, 8866, 1367, 38, 9101, 76, 905, 20, 6420, 800, 3726, 3726, 31, 57, 392, 21, 8247, 8741, 4865, 30, 1927, 5816, 8091, 26, 21, 2374, 9, 37, 30, 487, 18, 4865, 31, 12298, 14, 7480, 1054, 20, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...