Posts

Showing posts from June, 2011

applescript - How to click a checkbox of a drop-down tab in System Preferences -

I am trying to create an AppleScript to replace an option in System Preferences. The checkbox is displayed by clicking on "Mouse option ..." in the "Access and change pad" menu of the "Access Options" pane. The script I have written so far is able to navigate through system preferences so that the desired checkbox is clicked To be. However, I do not find a way to click the checkbox, it appears because the checkbox is within the 'drop down tab' of a type of window. Show the application Activate "System Preferences" Set the current pane to the pane ID "com.apple.preference.universalaccess" The name of each anchor of the pane id "com.apple.preference. Universalaccess "anchor reveals" mouse "pane id" com.apple.preference.universalaccess "Show application" system events "to tell the" system preferences "process, click on the window's" button "button to tell"

Linq2SQL query automatically creates a duplicate database at runtime in ASP.NET C# -

I have updated, deleted, and edited questions in Linq2SQL whenever I run the program, it will automatically run a duplicate of the current database Creates and changes the database in the database. I tried to remove it, but whenever a program is run it creates a new database and changes it. Please help me speed up this problem. Therefore, for that you have to delete the application code shown on the solution that works on Solution Explorer. This next time you start, you will ruin the problem of duplication of the database.

c++ - Matrix muliply fails while creating the model view port transformation -

I am trying to get the current model view port transport. But when I try to multiplayer my phantom matrix with the vortex matrix, it fails but the matrix looks just fine. Unexpected exception on 0x00B4A67B in Project.exe: 0xC0000005: access violation location 0xFFFFFFFF Reading xnamathmatrix.inl fails on line 239 > // Operate at the first line vX = _mm_mul_ps (vX, M2.r [0]); But both vx and MR.r look ok. Take a look at the render method where this fails: zero firstscreen :: render () {if (m_d3dContext == 0) returns; Float blank chloror [4] = {0.0F, 0.0F, 0.25F, 1.0F}; m_d3dContext-> ClearRenderTargetView (m_backBufferTarget, clear collar); Unsigned int stride = sizeof (VertexPos); Unsigned int offset = 0; // Setup Inputlayout for Phantom remains how it is m_d3dContext-> IASetInputLayout (m_inputLayout); // Set Mistakes m_d3dContext-> IASetVertexBuffers (0, 1, and sprite.m_vertexBuffer, & long, and offset); m_d3dContext-> IASetPrimitiveTopology (D3D1

javascript return false form onclick not working -

I've done this one million times to prevent the button from going on, return the wrong from onclick but for some reason, this One button on one page in this form ... it ignores it submit input type "" onclick = "return false;" Value = "copy" name = "btnCopy" id = "btnCopy9" & gt; I have also taken a javascript function from here, so it really lies on itself. However, this button is submitting the form. Why can not I stop it? Any ideas? I do not see anything particularly strange about this button. I hope this is staring in my face and I am not seeing it. type = "submit" this The reason is that he is submitting the form.

java - Error: mediaplayer start called in state 0 error(-38,0) -

I'm new to Android and I have Meediapayr link to play music on which is written the code i boolean flag; @Override protect a folder path = "// localhost / Android / SD / vande.mp3 public class MainActivity extends Activity {button to start, stop, made stop file contains zero onCreate (Bundle savedInstanceState) {super.onCreate (savedInstanceState); setContentView (R.layout.activity_main); start = (button) findViewById (R.id.button1); pause = (button) findViewById (R.id.button2); stop = (button) findViewById (R.id.button3); final MediaPlayer mp = new MediaPlayer (); try {mp.setDataSource (Environment.getExternalStorageDirectory () getPath () + '/ Android / music / vande.mp3 ".) ; mp.prepare ();} catch (Exception e) {e.printStackTrace ();} mp.setOnPreparedListener (New MediaPlayer.OnPreparedListener () {public void onPrepared (MediaPlayer player) {//mp.start (); flag = true ;}}); If (flag == true) {override public zeros at {start.setOnClickListener (New OnClick

rails-4 not getting all columns from 2 tables with join -

यह मेरा मॉडल। आरबी model.rb सभी विवरण प्राप्त करने के लिए मैंने इस प्रश्न का उपयोग किया है User.joins (: computes)। जहां। नहीं (स्की: 'NULL') और मुझे USER तालिका से मिला, मुझे भी USER द्वारा COMPUTE से एक या अधिक स्तंभ प्राप्त करने की आवश्यकता है। आप इस तरह से उपयोग कर सकते हैं User.joins (computes)। Where.not (skey : 'NULL')। चुनें ("users.id, computes.name")

string - Blowfish encryption Android -

I want to encrypt a string with bluffish in my Android app. The result should be a string because I will send it to my server. I have the following code: KeyGenerator keygenerator; Try {keygenerator = KeyGenerator.getInstance ("Blowfish"); Secret Password = Key Creator. Generate (); String key = settings.getString ("key", ""); Byte [] KeyData = Key.getBytes (); Secret KKK = New Securecutis (Keydata, "Blowfish"); Cipher cipher = cipher Get Instances ("Blowfish"); Cipher It (Cipher NCRYPMODEG, KS); Byte [] Encrypted = Cipher .Donfoneal (Message .getBytes ()); Message = new string (encrypted, "UTF-8"); System.out.println ("Encrypt OK"); } Hold (exception e) {System.out.println ("encrypt error"); } The problem is that something in the variable message is R? C? J But when I decrypt it with javascript (js works fine ...) there is an empty string returned ... (I do not have anything on my website C

php - htaccess file serve programming -

I am hosting videos mostly for non-smart phones, but giving better quality videos for smart phones Want to The way I am doing this is watching YouTube Agent with HTACAC file because most non-smart phones keep in mind JavaScript and PHP. My problem is that I have an HTAC file for each video, because I do not know what the video people are trying to see. Is there a better way to do this? Thanks! Create a sensible, normalized file / folder structure that allows you to apply normalized rewrite rules . Example: Video / Low / abc.mp4 def.mp4 ... high / abc.mp4 def.mp4 ... With rewrite rules as: example.com/videos/abc.mp4 : < Code> RewriteCond & lt; Is mobile user & gt; RewriteRule Video /(.*) Video / High / $ 1 [L] Revert Raul Video /(.*) Video / Low / $ 1

parsing - DateTime.ParseExact ignore first char C# -

मुझे एक उपकरण से string मान मिलता है जैसे " 1140421164500 " । मुझे इसे दिनांकटाइम प्रकार में परिवर्तित करना होगा। मैं DateTime.ParseExact फ़ंक्शन का उपयोग करना चाहता हूं। मुझे पता है कि मैं इसे पहली बार मैन्युअल रूप से निम्न रूप से छोड़कर इसे परिवर्तित कर सकता हूं: दिनांकटाइम। पैरासेक्स ("140421164500", "yyMMddHHmmss", कल्चर इन्फो। इन्विरियनटीकचर); लेकिन मैं मैन्युअल रूप से पहले अक्षर को छोड़ने से बचना चाहता हूं। मैं इसे वाइल्डकार्ड char में ParseExact फ़ंक्शन जैसे: मुझे ध्यान दें कि डेरेलाइट की बचत के समय के लिए पहले अक्षर 1 हो सकते हैं, या निष्क्रिय के लिए 0। डिवाइस मुझे " 0140101000000 " भी पसंद कर सकता है। क्या इस फ़ंक्शन के लिए कुछ ऐसा है? इसमें कोई वाइल्डकार्ड वर्ण नहीं है, जिससे वह आपकी स्ट्रिंग में प्रत्येक संभावित वर्ण को पार्स कर सकता है। आप अपने प्रारूप को अपनी स्ट्रिंग का पहला अक्षर जैसे जोड़ सकते हैं; स्ट्रिंग s = "1140421164500"; कंसोल.प्रकाश लाइन (दिनांक समय.पर्स ईाक्टेक्ट (एस, एस [0

java - pointcut for inherited methods -

How can I match all the available methods for a particular class? For example, A / | \ BCD / | \ EF I T I need to match all the methods available in the T , so these methods are the methods defined in T and they are inherited Methods found in the classes from a , c , f . I came to the following points, but was not very happy with it as it T : execution (* A +. *. ..) & amp; As I understand, the elements identified from such a point are a , b , c , D , e , F , I , T . I do not want to affect sections outside the family. This would be ideal if only T is affected (legacy method can be identified with the code overridden. ) There are many classes and I want to reduce the effect on the rest of the system, that is, I only need to change the behavior of class T and these changes do not want to affect other classes. I can point to the following: (execution (* a * (..)) execution (* c (..)) ... ... & lt ; All guardian classes & gt;); & Amp;

c# - Split and Merge MP4 video -

I have a desktop application (MFC) in which I now have to split and merge the MP4 video. I have searched a lot and almost nothing has not been found online Please help me with some signals how to proceed and use whom. Partitions and merging should be done on a timeline basis and not on the basis of size. Code is in VC ++ Can I get it with a Windows Video Encoder? If so, how do you know about the methods exposed in WME? DirectShow (now part of Windows SDK) provides editing services (EDS), but I recommend that ffmpeg () is a better alternative, because it supports a wider range of formats (like H.264-) .

node.js - How to find common properties between JavaScript objects -

What is the best / most effective way to find common / different properties of an array of objects I need to identify the set of properties present in all the objects and all have the same value (normal). Preferably, I would like to get an array with all other properties (difference) I have discovered a skilled library / function which can do this. But nothing was found. 'Bob'}, {/ id} id: '2j2w3f', color: 'red', height: 20, width: 41, owner: 'Bob'}, {id: '2j2w2f', color: 'red', height: 21,}, {id: 2j2w1f ', color:' red ', height: 21, width: 44}]; I would like to identify the color (value red ) as the only general property, note that they have the same properties Not set as owner is not a common property. This is my own attempt to solve (using the trash): function General Defofriftes (objects) {// Normal start as initial object, and Then remove non-normal properties var normal = objects [0]; Var different =

echo - PHP Description Excerpt -

I have the following code and it needs to resound 100 words or less in the description rather than just the entire description. Is there a way to do this by editing this code? public static function getExcerpt ($ profile) {$ out = ''; If ($ profile ['description'])) {$ out. $ $ [Profile ']' ' '.__('', 'love story'); } Return Out $; } Thanks! 100 characters for // ... if (strangel ($ profile ['description] ']) Gt; 100) $ description = substr ($ profile [' description '], 0, 100). "..."; And $ details = $ profile ['description']; $ Out. = $ Details ''. __('', 'love story'); 100 words for // $ out. = Implode ("", array_slice (explosion ("", $ profile ['description']), 0, 100)). ' '.__('', 'love story');

Select2 multi-value: How to refresh -

Image
I am using AJAX in Rail 4 to load this form. Using the Select2-rails gem, this document loads properly: After clicking Update, it loads partial view: But when I click on the edit, the style is not visible, and only the default bootstrap style is displayed: < P> How do I get the final image to show select2 style from the first image? I think what to do with it is how the select2 style is loaded when the document loads for the first time, but appreciates the solution here: My stylesheet is here: $ (Document) .ready (function () {$ ("# e9"). Select2 ();}) Allen: Hello again ... I had a similar problem in Rail 4 and had to do it with turbolinks. Link: Prepare your document for the function name below in your JS file, then add two commands just below the function, which are also below. This may also be your problem because your page loads properly initially, but when the turboilance is working, it tries to load only the first loaded files t

sql server - SQL Find difference between previous and current row -

I am trying to find the difference between the current row and the previous row. However, I'm getting the following error message. The multi-part identifier "TableName" can not be constrained Not sure how to fix the error Thanks The output will look like the following:.! columnOfNumbers difference 1 zero 2 1 3 1 10 7 to 12 2 .... code: Usage Database; CTE with more than ROW_NUMBER (selected columnOfNumbers by tableName command) columnName from TableName) CTE Select from a left a.columnOfNumbers include a.columnOfNumbers = b.columnOfNumbers = b.columnOfNumbers and a.ROW = b on CTE B ROW + 1 ; As with tblDifference (select ROW_NUMBER) (select RAW_NUMBER) as RowNumber, select TableOfNumbers from TableName), cur.columnOfNumbers, cur.columnOfNumbers - tblDifference from previous.columnOfNumbers CUR Left External TblDifference .RowNumber = previous.RowNumber + 1

jsf - Logout message doesn't show -

When I log out of my application it does not show my logout message I have an output text to show the message in my output ( & lt; h: outputText id = "message" value = "# {loginMB.message}" /> ): & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE Structure PUBLIC "- // W3C // DTD XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Ui: Composition xmlns = "http://www.w3.org/1999/xhtml" xmlns: f = "http://java.sun.com/jsf/core" xmlns: H = "http: // Java. Sun.com/jsf/html "xmlns: o =" http: // java.sun .com / JSF / Facet "Template =" / Web-ANF / Template / Template.XMAMT "& gt; & Lt; Ui: Define name = "content" & gt; & Lt; o: include in form id = "login" view = "true" & gt; & Lt; H: output text id = "message" value = &q

php - Preventing bots from spamming registrations without captchas -

मुझे बॉट्स को स्पैमिंग अनुरोधों से खाता निर्माण पेज (प्रति HTTP पोस्ट अनुरोध) में रोकना होगा, लेकिन मैं नहीं चाहता Captchas का उपयोग करें और न ही मेरे पास उनके आईपी (यह एक छिपी सेवा है) की पहुंच है। वैसे मैं जावास्क्रिप्ट (tor ब्राउज़र) का उपयोग नहीं कर सकता क्या ऐसा करने के लिए कोई तर्कसंगत तरीका है? एक वैकल्पिक समाधान एक मधुमक्खी का उपयोग करना होगा: अपने फ़ॉर्म में कोई प्रपत्र फ़ील्ड जोड़ें और उसे विज़िटर को देखने से छुपाएं (उदाहरण के लिए इसे ऑफ-स्क्रीन पर स्थित करें); आगंतुकों को नोटिफिकेशन (स्क्रीनरीडर ...) में जोड़ें सभी फार्म फ़ील्ड में सबसे अधिक संभावनाएं भरेंगी; सभी फॉर्म सबमिशन को छोड़ दें, जो मधुपॉट फ़ील्ड में भरा हुआ है (रिक्त नहीं है)।

gpu - CUDA: it is possible for a kernel to return a break to CPU? -

I am using c program CUDA parallelization, and I was wondering if it is possible to return to from to CPU My program essentially is for the loop and I do several parallel actions within that loop; At the beginning of each iteration, I have to control a variable (just measuring the improvement of the ongoing improvements), which remains at GPU My wish is that the variable In order to control the control over CPU to loop (I have a slight kernel <<> <1>> ). I have tried copying that variable back to the CPU and controlling the CPU, but I was afraid, it sloows the overall execution down. Any advice? There is currently no way that code running on the CPU-enabled GPU code is hosted on the host CPU While stopping, it is not absolutely clear what you are asking about, I am certain that the answer is simply not because there is no available or interrupted mechanism available in any host party device code.

how to replace text in vbscript -

I am trying to use VBScript to replace the input, for example entering the user name lastname Firstname format, but once he enters I want to print it like Hello: First Name Last Name This is what I have done so far strInput = InputBox ("name, last name, enter first name format") WScript.Echo "Hello:" & amp; strinput Since there will be a comma between the last name and the first name, you can Use the split function to separate the names in an array. a = split (strInput, ",") Now, A (0) is the first element (their last Name) and a (1) second element (their first name). MsgBox "Hello" & amp; A (1) & amp; "" & Amp; One (0)

Is there a llvm java front end that converts java source to llvm's intermediate form? -

I have a live program from what I read, Java bytecode is called Class 298vm of LVMM's intermediate form. My question is, how can I reach it? What interval do I have to set up to reach this? VMKit is implementing one of their JVMs, but I see how to save the Java server with LVMmi, not how to run it. Java frontend translates Java bytecode (.class files) into LVVM bytecode. Take a look at this link:

How to wrap a container to have a background gradient using bootstrap? -

How do I wrap a square container so that I have a 100% background shield? I do not want it to be applied to the whole body, though. Just for the container. Add a class to the container div element for example & lt; Div class = "container word wrapper" & gt; Here's some content & lt; / Div & gt; In the CSS file, .wrapclr {background-gradient}: Your choice; }

Jquery TimeCircles Value when stopped -

It is so far from me. I want to be able to delete a hidden class from a submit button and then copy the timer value to the hidden text field. Any help would be appreciated. "Circle_bigth": 0.1, "Circle_big_golore": "# 60686F", "Time": {"Day": "Time": ("Start": Wrong, "Animation": "Smooth", "BG_Width": 1.2, : {"Text": "Day", "Color": "#FFCC 66", "Show": Incorrect} "Hours": {"Text": "Hours", "Color": "# 99ccff", "Show ":" "," Minutes ": {" text ":" minute "," color ":" # $ (". Stop"): "", "show": right "}", "show": true} , "Seconds": {"text": "seconds", "color": "#ff 99 99", "show": true}}}) click (function () {$ (&

Python How to post form with request -

After I want to use the request to post the form with the dragon and request it has 2 value form with the user And pass them to the present. Form method = "post" action = "/ maxverif / 0" name = "loginf" id = "connect" & gt; P> you can please me & lt; & Lt; p class = "title" & gt; Connect & lt; / P & gt; & Lt; div class = "before" & gt; & Lt; div class = "ques" & gt; & Lt; Div class = "name" & gt; Mail: & lt; / Div & gt; & Lt; div class = "input" & gt; & Lt; Input type = "text" name = "user" /> gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "question" & gt; & Lt; Div class = "name" & gt; Near & lt; / Div & gt; & Lt; div class = "input" & gt; & Lt; Input type = "password" name = "pass"

I'm not able to call classes from scala AST. The classes are not being found -

I want to know how to create nodes so that they instantiate classes in that code. Currently, it is not able to recognize the nodes if I modify the code. object test {def main (args: array [string]) {val a = new avi; } } class avy {} class pra {} after the node I have created in AST And replace the Validify node for the parameter val newRhs = select (new (intro ("Pvt"), newTermName ("& lt; init>");); RetTree = Treecap. Waldiff (VD, Modes, Names, TPT, NRHHS); I'm getting the following error error: not found: value pra I know if The way I made the node is wrong and I have to do something else to change the AST I am passing this Ratati in the transformer class. Type type is not found in type type of compiler. Any help would be greatly appreciated. change ident ("pra") identity (newprint name "Pvt")) .

c# - Expression... LINQ to Entities only supports casting Entity Data Model primitive types” -

मेरे पास यह सामान्य विधि है: सार्वजनिक IQueryable & lt; TEntity & gt; PaginateAndOrderByDesc & LT; TEntity & gt; (पूर्णांक pageIndex, पूर्णांक pageSize, अभिव्यक्ति के & lt; समारोह के & lt; TEntity, वस्तु & gt; & gt; orderByDescending) जहां TEntity: वर्ग, IContextEntity {int numberOfRecordsToSkip = (pageIndex - 1) * pageSize; वापसी संदर्भ .सेट & lt; टेन्टीटी & gt; ()। आदेश क्रमबद्धण (आदेशब्राउडसींडिंग)। स्किप (संख्याऑफ़रेक्शंसटोस्किप)। ले जाएं (पृष्ठ साइज़); } जब मैं इसका उपयोग करता हूं: सूची & lt; व्यक्ति & gt; लोग = रिपॉजिटरी.पगनेट एंडऑर्डर बाय डीस्क & lt; व्यक्ति & gt; (1, 30, x = & gt; x.RegistrDate) .ओलिस्ट (); मैं कोई त्रुटि मिलती है: "।। संस्थाओं केवल कास्टिंग ईडीएम आदिम या गणन प्रकार का समर्थन करता करने के लिए 'System.Object' LINQ टाइप करने के लिए प्रकार 'System.DateTime' कास्ट करने में असमर्थ" मैं कैसे कर सकता हूँ कि orderByDescending अभिव्यक्ति के साथ सामान्य समारोह काम करता

`require': cannot load such file -- rubygems.rb when installing ruby and rubygems with rvm -

I was trying to use RVM on a new installation of Ruby and RubyGums at Ubuntu 13.10. I already had an installation, before it got corrupted in some way. I decided to restore everything, so I started removing all traces of Ruby and Ruby rvm implode . However, after restoring it using \ curl -L https://get.rvm.io. bash -s stable - rue source / home /&ltususername>/.rvm/scripts/rvm when I run the gem install rails , get me The following error occurs: & lt; Internal: gem_prelude & gt ;: 1: In 'requirement': Can not load such a file - from rubygems.rb (LoadError) & lt; Internal: gem_prelude & gt ;: 1: in `& lt; Compiled & gt; ' What's the problem here? It turns out that my problem was that I used to type the gem manually Had made a symbolic link from / usr / bin . After removing the symbolic link, I am restoring everything using the following commands: rvm implode \ curl -L https://get.rvm.io | bash -s static -

Ruby substitute for goto -

How can I do something like this in Ruby? if variable = do something then do a do do do elsif variable = something different do do do do do do do do a do c do do da = with set of loops If else b = set if there is a set of loops with loops of some other then d = the last step searching for a way to accomplish something like that in Ruby I'm sure The answer to this question is somewhere, but I do not know what to say. I got some information about a gem which allows you to use goto but I like to learn to do it correctly (I think it might be a joke) I write myself a code I like it, but if my question helps answer, then I can put my actual code. If someone can tell me in the right direction. If Goto is not a joke, then why is not it okay to use it? A, B and works for it and use them for example For: end of DIF A # code lot You can now only A by getto A can do. In addition to this instead of using it / if you can use the switch case, so your code looks li

bluetooth lowenergy - Android does not make the BLE findme device beep -

I am trying to apply the application that will communicate with the BLE findme device. I have one of these devices, but there is a problem with this. By using the iPhone I have tested this device with the help of a bit of app and this app works correctly, i mean read all the device's characterization and the device To make the beep sent to the features. But using the Android (Nexus 5) I could only read the features of the device, but the device can not make beep. My code is: Private static last UUID IMMEDIATE_ALERT_SERVICE = UUID.fromString ("00001802-0000-1000-8000-00805f9b34fb"); Private static final UUID IMMEDIATE_ALERT_LEVEL = UUID.from string ("00002a06-0000-1000-8000-00805f9b34fb"); ... Public Zero Bip (DeviceData Device) {BluetoothGatt Gate = mConnectedDevices.get (device.getDeviceAddress ()); BluetoothGetService BluetoothGetSaveWire = gatt.getService (IMMEDIATE_ALERT_SERVICE); If (bluetoothGattService == empty) {return; } BluetoothGatProfile

matrix dimensions wont agree when elements match/matlab -

I have a problem with the final calculation of my code, the very last part, where log is the natural log I RD = FAC. * Log (logs) (FACS) is needed to split Sigmaphack, or Robin = Segment / RD. My RD goes from 1 to 100, so why is my sigmaphake matrix dimension mismatch? I want to divide the number of symphafe corresponding to the numbas of RD, all have the same dimension, so I do not know where the problem is coming from. I realize that RD (1) = - IF, is this causing the problem? And how do I fix it? Code: n = 100; primlist = 2; Numba = 1: n; To start list of master number% if mod (2 + numba, primlist) ~ = 0 primlist = [primlist; 2 + numba]; % Priority number list expires end = fac = 1; % Factorials Start RD = 0; For numbas = 2: n% preallocating vectors later used prims = zeros (size (primlist)); pprims = void (size (primlist)); POW = prims; For I = 1: Length (primelist)% to identify each prime in the primal # 1: 10 if the mod (numbas, primlest (i). ^ K) == 0 primers (i) = pr

angularjs - Failing to load route with Angular inside of Phonegap -

I'm new to angular and can not figure out how to get a way to work inside phonegap. Here is my angle code: var app = angular.module ('app', ['ngcquis', 'ngrssr', 'ngsnities', 'ngrut']) $ RouteProvider.when ('/ test', {$ routeProvider.when ('/', {templateUrl: 'app / view / main' html ', controller:' main control '}) TemplateUrl: 'app / view /test.html', controller: 'testControl'}) $ routeProvider.otherwise (Approx; {redirectTo: '/'})}; App.controller ('mainControl', function () {}) app .controller ('testControl', function () {}) I am trying to use with '/ test' this link inside my main website: Click & lt; span & gt; Click & lt; span & gt; to go to & lt; a href = '/ test' & gt; here & lt; / a & gt; test page. If I click the link inside the link, then I get 404 in the console for the local host: 4400 / test

security - It's safer to store data in clear or to encrypt it and store the decryption key? -

I am writing an app that needs to deal with important data. I was wondering if it is safe to store these important data in a program variable or to store an encrypted version of data in a variable and decryption key in another variable. The problem is here, in my opinion, if a data accesses in an empty form or encrypted data with the decryption key, then it basically has access to the data. So, who is the safest and why? Is it safe to keep the decryption key safe instead of stored in OS build-in keyring? Is there any safe way to do this? Sensitive data stored in long-term storage should always be encrypted. Press the key separately so that the data can not be stolen. You can put it in safe on a USB stick (offset with secure backup copy) and can change it regularly. Really need to keep the processed data in decrypt and plain text. Make sure that any data, and key, explicitly overwritten before memory is released, what you can do through your operating system, it can

javascript - Using && as a replacement for IF statement -

I found the following snippet when digging through some code: "string" ! = myVar type & amp; Amp; (MyVar = ""); I understand what happens here. If myVar is not a string, then the first condition is true, the second condition is evaluated, so that my veril can be set to "". Therefore it is essentially the replacement for the following: if ("string"! = MyVar type) myVar = ""; The only obvious difference is that there is a return statement even before two strategies, although I found that the code is not using the returned value. So I am thinking: Is there any strategy or strategy? If the only supporters for the first strategy have the ability to return a value, then snippets are considered bad programming because it is more difficult to read? Just to indicate, less obvious use of this idiom is more obvious . "string"! = Type myvar & amp; Amp; (myVar = ""); I have read it and actual

momentjs not working with meteor -

मैं उपयोग करना चाहता हूं मैंने mrt add bootstrap3-datetimepicker में भाग लिया मेरी उल्का परियोजना इसके बाद मैं mrt install moment और mrt update moment चलाता हूं क्योंकि निर्देश मुझे बताता है। जब मैं अब mrt run मुझे निम्न त्रुटि मिलती है: = & gt; त्रुटियाँ स्टार्टअप को रोका जा रही हैं: अनुप्रयोग का निर्माण करते समय: त्रुटि: ऐसा कोई पैकेज नहीं है: 'क्षण' मुझे यह क्यों मिल रहा है? और अगर मैं mrt क्षण जोड़ें मुझे यह मिलता है: /usr/local/lib/node_modules/meteorite/lib/meteor.js:154 "एक आदेश चलाने में त्रुटि:" + त्रुटि; ^ एक कमांड चलाने में त्रुटि: त्रुटि: कमांड विफल: = & gt; संकुल स्कैन करते समय त्रुटियां: पैकेज का निर्माण करते समय 'bootstrap3-datetimepicker`: त्रुटि: ऐसा कोई पैकेज नहीं:' पल ' इस मुद्दे पर आने वाले किसी भी व्यक्ति के लिए, moment.js आधिकारिक रूप से उल्का का समर्थन करता है: उल्का जोड़ें moment: पल

Ask about a particular java collections having following properties -

I want to ask about the collection that I can use in my project. The following are my requirements. It has a key-value pair. is a mobile field and the other is the distance. The mobile field is unique, but the distance is not unique. They should be stored in the ascending order of the distance area. I do not want to delete the duplicate distance (key-pair). I already distribute distance as the TreeMap value and take the distance as mobile. But it is removing duplicates and I can not even make mobile as a key, because otherwise it will sort the pair according to the value of the mobile. So please tell what to do. tree map tree = new tree map (); While (rsnext ()) // Distribution and crowd values ​​here tree. Abundant (dist, mob); } Set = Set. Tree.entrySet (); Iterator IRR = Set.itator (); Out.println ("Distance" + "Mobile"); While (IRHHXXext ()) {map. Entry M = (map entry). (); Out.println (m.getKey () + "" + m.getValue () +

git log internals: performance using the reverse option -

To allow me / others to enter the internal, someone can tell me that display of git log A. . - When reverse option is given, B is bad? My understanding is that the list of commitments is related to dual so I did not think so. However: If I use the -nx option, git log-nx a .. b it happens. But now if I use the git log-nx - reverse a.b. , even if X reverse order is b. ? committed "link" unidirectional 1 but the display will basically be the same For reasons. Specifically, notation a .. b means " a to b ". It actually means to calculate a set difference: accessible (b) - accessible (a) , where is reachable () Such a set is "accessible" starting with the given reference label. 2 That is, the first GIT name resolves that raw SHA-1, then, for the commitment identified by that SHA-1, it all gets Although it is a bit more complex (it is done internally and is very customizable), 3 you can think of the git log as if

c# - Why can I not set a Func to return a parameter type to an integer value? -

If the function returns the compensation, then I only return one type of return type to the last parameter function < .... in the parameter list .... Q: Why can not I set the function to return type? Or am I using the variable return result which is declared as above? Neither do the work. Code: int tempValueResult = Func & lt; int, int, int, int, int, int, int & gt; MyMeth6 = (a, b, c, y, e, returnResult) = & gt; {Console.WriteLine (a + b + c + y + e); Return (A); }; Console.WriteLine (returnResult); or - complete return result = 0; Function & lt; int, int, int, int, int, int, int & gt; MyMeth6 = (a, b, c, y, e, returnResult) = & gt; {Console.WriteLine (a + b + c + y + e); Return (A); }; Why can not I set the function back to? Because a function that returns a int is the function , not a int . The specific input given is the result is a int of that function. In both instances, you have not given any value for input,

android - What models of Samsung smartphones have missing period for html5 input type="number"? -

एचटीएमएल 5 में "नंबर" नामक एक नया इनपुट प्रकार है अधिकांश मोबाइल स्मार्टफ़ोन पर यह एक संख्यात्मक कीपैड लाता है। पूर्व-एचटीएम 5 फोन पर टाइप "पाठ" पर वापस आता है और हम ठीक हैं। फिर भी, कुछ मॉडल पर संख्यात्मक कीपैड नहीं है एक अवधि और कोई एक जोड़ने के लिए "प्रतीकों" बटन पर क्लिक नहीं कर सकता इस दोष के साथ ज्ञात मॉडल हैं: सैमसंग गैलेक्सी एस 4, देखें: सैमसंग गैलेक्सी नोट II सैमसंग गैलेक्सी टैब 2 10 "देखें: ???? अन्य सैमसंग एंड्रॉइड 2.2 फोन में यह समस्या नहीं है। नबी टैब जैसी अन्य एंड्रॉइड डिवाइसों में यह समस्या नहीं है। मैंने पढ़ा है कि गैलेक्सी एस 3 में यह समस्या नहीं थी। संबंधित चर्चा देखें: इसके अलावा, उन पर ध्यान नहीं दिया गया है कि इनपुट प्रकार = "टेल " आईपैड के लिए ठीक काम करता है लेकिन आईफोन पर नंबर के लिए प्रतिस्थापन के रूप में काम नहीं करता। डिवाइस मॉडल को निर्धारित करें या फिर इनपुट प्रकार = "टेक्स्ट " पर जाएं। फ़ोन और टेबलेट मॉडल गलत तरीके से इनपुट प्रकार = "संख्या" संपूर्ण, गैर-दश

php - How to use variables in callback functions? -

(how) is it possible to use a variable within a callback function? For example, I want to use the $ add variable inside my callback function: private function addToWord ($ add) {return preg_replace_callback ('/ ([Az]) + / i ', function ($ word, $ add) {return word $. $ Add;}, $ this- & gt; text); } You can use here: Private function addToWord ($ add) {return preg_replace_callback ('/ ([az]) + / i', function ($ word) usage ($ add) {return $ word [1]. $ Add;}, $ this- & Gt; text); }

html - Display a div for a particular element in AngularJS's ng-repeat loop -

I have the HTML code in which the angiaries with the div is SG ng-double. What I want to do, shows the division that says, "You have already voted for this review" for only that particular element for which div [id = "arrow_up"] is clicked. This code displays the code "You have to .. .." once click for all the elements of the loop, apart from this, the requirement is to go to this device after 5 seconds intervals. & lt; div class = "col-xs-4" ng-repeat = "review in date_reviews $ track by index" & gt; & Lt; Div id = "arrow_up" class = "arrow-up" ng-mouseover = "message_up = true" ng-mouseleave = "message_up = false" ng-click = "save ovate (review [0] .review_id, 1, $ index) ; "Ng-square =" {vot_capture_top: voted and index $ == selected index} "& gt; & Lt; / Div & gt; & Lt; div ng-show = "voted_msg_up" ng-class = "{message: $ in

java - Enum-based singleton implementation and unit tests which preserve state as a side-effect of enum -

As many say, singleton is bad, it's an "anti-pattern". Fortunately or not, I work with some code which is in it and it will not work in the near future. So my problem is as follows. A singleton state: Import java.util.HashMap; Import java.util.Map; Public Enum Singleton {INSTANCE; Private Last Maps & lt; String, string & gt; _mapper = New Hashmap & lt; String, string & gt; (); Public string getValue (string key) {return _mapper.get (key); } Public Zero addEntry (string key, string wall) {_mapper.put (key, val); } Remove the public string (string key) {return _mapper.remove (key); }} Very dumb test that does not take into account that the singleton INSTANCE state is preserved on the test run: import org. Junit.assert; Import org.junit.Test; Public category singlettest {public static final string KEY_1 = "key_1"; @Test Public Zero Teston () {Singleton. INSTANCE.adderer (KEY_1, "val_1"); Singleton INSTANCE.addentry ("ke

usb - What should Connection Settings in Windows Mobile Device Center/Active Stync be when connecting to a handheld device? -

Image
As of today, I'm no longer connected to my handheld device. According to the Windows Mobile Device Center, it can not even see it, for this reason, the device does not appear either in Windows Explorer. Some settings have been altered in some way - see for more information. So I was fooled around with it to see if it had to work again: I booted the device several times and I booted it. I rebooted the PC again. < I changed the connection settings ("Bluetooth" to "com1"), although it seems weird, it stops "Allow USB connection" I also changed all the hardware: crib, USB cable, and power cable; I also put a battery in the cradle (it was not the first one). nothing helps. Now the Windows Mobile Device Center looks like this: Is this my settings? (Motorola / Icons) What should they do to connect to the handheld device? Or are they not even necessary (settings) problem? UPDATE It says: "In the left pane of the Sync Cent

java - Reading an XML file with JAXB -

मैं वर्तमान में XML फ़ाइल पढ़ सकता हूँ: & lt;? Xml version = "1.0 "एन्कोडिंग =" यूटीएफ -8 "स्टैंडअलोन =" हां "? & gt; & Lt; ग्राहक आईडी = "100" r = "q" & gt; & LT; datas & gt; & LT; डेटा & gt; & LT; उम्र & gt; 29 & lt; / उम्र & gt; & LT; नाम & gt; MKY & lt; / नाम & gt; & Lt; / डेटा & gt; & Lt; / datas & gt; & Lt; / ग्राहक & gt; ग्राहक वर्ग का उपयोग: @ एक्सएमएलआरूट एलेमेंट लोक क्लास ग्राहक {स्ट्रिंग का नाम; स्ट्रिंग युग; स्ट्रिंग आईडी; स्ट्रिंग आर; @ एक्सएमएल एट्रिब्यूट सार्वजनिक शून्य सेटआर (स्ट्रिंग आर) {this.r = R; } / Etc} मैंने एकाधिक ग्राहकों को समर्थन करने के लिए XML फ़ाइल का विस्तार करने का निर्णय लिया: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8 "स्टैंडअलोन =" हां "? & Gt; & LT; ग्राहकों & gt; & Lt; ग्राहक आईडी = "100" r = "q" & gt; & LT; उम

python - Maxscript registeroleinterface appears to not be working -

First of all, whoever reads through this and gives me some help / feedback because I am a couple I'm struggling with it for the day I am new to stackoverflow and have tried to be as detailed as possible in the question. I'm trying to install an OLE server on 3ds max. I have followed the instructions [[here] () including editing the registry and highlighting the function. However, when I try to call the function from another program, I get an error which leads me to suspect that the registerOLEInterface function is not recorded (I have MATLAB and a dragon script with tried). In Python, I used a very similar script before [here] () and received an error like this: 'traceback' (most recent call final ): File "Start .py", line 8, & lt; Module & gt; MAXCOM ._FlagAsMethod ("maxCommand") file "C: \ Python27 \ lib \ site-package \ win32com \ client \ dynamic.py", line 437, _FlagAsMethod description = build.MapEntry (self .__ Att

unit testing - Writing a test in Laravel to determine if ORM items are in the correct order -

I wrote a test to draw 10 articles from my database. I then wrote the code to pass the exam and this work Does. However, now I want to write a test to make sure that 10 articles dragging from the database are based on descending order created_at . I'm not sure how to know about this. Test Method: public function testPullTenArticles () {for ($ i = 0; $ i & lt; 20; $ i ++) {$ temp article = New paragraph; $ TempArticle- & gt; Save (); } $ This- & gt; Emphasizing value (10, calculation ($ this-> article-> getArticles (10))); } Actual method: public function getArticles ($ count) {$ article = Article :: take ($ count) - & gt; get (); Return $ article; } If you are using by order Retrieve your items, then you do not need to check it - those who are good people who are Laravel & amp; Corrective code has already been done. You can order your archive in this way: $ articles = article :: orderBy ("created_at", "desc&quo

c# - Create object of abstract class. How possible -

Why is this possible? : Bitmapsource I = Imaging KrebetMapsSourceFrom HBTemap (...); I am writing some APIs to search for this line and IM coneface, because MSDN says that bitmapsource is an abstract class. Bitmapsource is an abstract class and thus directly can not be created, but imaging The CrabetMatMopSourceFrom HBTemap returns some solid squares that inherits to bitmapsource and thus "code" can be "cast" in bitmapsource . It is incompatible to be an intangible class but is going to be a solid giraf class which gets it from: Animals a = new animal (); // Invalid animal A = zoo Composition endless name ("giraffe"); // valid - gives a giraffe example

Substitute partial line in vim using only substitute command -

I am editing a file with the same lines as: { "a_function", A_function}, {"a_second_function", a_second_function}, I would like to change the underscore to blank space, but only within quotation marks. Is this a way to do this using the : substitute command? I know I can do this by recording a macro and maybe there are plugins that can do this, but for cleverness I want to do it with a : substitute command in a shot. You should do this command: :% s / v (". {-}") / \ = option (constraint (1), "_", "", "g") I add quotation marks to the first pair on each line I remove all as a replacement with underscores.

Splitting an array by performing an arithmetic function in ruby -

I have an array like Ruby in [3,4,5] and I want to create For diving or multiplying sub-orange, for example, I want to multiply each number from 2, 3 and 4 into the array, [[6,9,12], [8,12,16], [ 10,15,20]] Next, what is the best way to calculate the total number of units? In this example, this would be 9, while returning array.count 3. Thanks You find it useful to use matrix operations, especially If it is a step in incorporating the matrix, vector, and / or scalar. Matrix 'DF DET (AR1, AR2) (matrixcolum_quaker (AR2) * matrix.ro_ vector (AR1) is required. TO_A termination def NBR_letment (AR1, Arr2) arr1.size * arr2.size end example arr1 = [ 3,4,5] arr2 = [3,4,5] dot (AR1, AR2) # = & gt; [[9, 12, 15], # [12, 16, 20], # [15, 20, 25]] nbr_elements (arr1, arr2) # = & gt; 9 dot ([1,2,3], [4,5,6,7]) # = & gt; [[4, 8, 12], # [5, 10, 15], # [6, 12, 18], # [7, 14, 21]] nbr_elements ([1,2,3], [4,5] ], 6,7]) # = & gt; 12 Optional If you d

c++ - QFileDialog (QT 5.2.1/mingw32) won't allow me to choose a read-only file -

Image
QT 5.2.1 Win7 64-bit I use QFileDialog to select I am filename It is unknown at the time of choosing that the file will be written or read, so QFileDialog :: getOpenFilename () and QFileDIalog :: getSaveFilename () do not work well for this Are there. For some reason, I can not choose a file that has been marked "Read Only". If I pass options for "DontUseNativeDialog" So, I can do select the file to read only, though it is less than ideal. AFACTT, there is no reason that I should not be able to select the read only file with local dialogue. Is it just a bug in the implementation of windows, or am I missing something? The relevant code for creating dialogs: // Create a normal file dialog QFileDialog dialog (NULL, Tr ("select disk image")); Dialog.setNameFilter (tr ("Image Files (* .img * .IMG) ;; *. *")); dialog.setFileMode (QFileDialog :: AnyFile); // Basic dialog should be. Setup mode (QFileDialog :: extension); // shoul

c# - Post Method in Windows Phone 8 -

I need to send some criteria to a php server using the post method in WP parameters and get feedback in json format . I have the previous code piece: public static async zero GetData (string URL, string data) {HTTP Client Client = New HTTP Client (); HttpResponseMessage feedback = client.PostAsync (new URI (url), awaiting new string content); Response.EnsureSuccessStatusCode (); String feedbackBody = awaiting response. Content RedAssressingSync (); MessageBox.Show (responseBody); // just showing the response for now) This shows a message from the server (which is an error stating which fields) it actually communicates with the server but the problem is I am calling the above method: GetData ("http_address_here", "? Action = registrar & email =asc@fsdf.com& password = 54561wefwe and Firstname = sdfsdf and lastname = sdfsdf and image = 10 "); But I saw an example sending XML data, perhaps calling the fault method. Looking at the tens of the s

Using sed to modify a header -

Assumed I had a file containing the header: exm2240_T exm4561_g Exm1916_0 exm490_1 rs67856512_A I was thinking how to show headers using SAD: exm2240 exm4561 exm1916 exm490 rs67856512 Simply remove the underscore and the following character: sed ' S / _ // g '

oop - draw new object onto existing canvas in Scheme using paint-callback -

In some background, I am creating Space Invaders as a project in a CS class. Currently I am working on making the player ship shoot projectile, I am not worried about conflicts, just creating projectiles. (define projectile% (class object% (init-field [image (make-bitmap 10) 10 x 10] [x 100] [or 100] [speed1]) ( Defined / public (image) (defined / private (move-up) (set! Y (- y motion))) (define / translate DC (+ x (/ w2)) (+ (send to dd) (Presenting DC (DC) ((W (send image received-width)) (H (image get-height send) DC dot-bitmap image (- (/ (2/22)) (- (/ H2 )) Send (DC Translation (- (+ (X (/ 2W)) (- (+ Y (/ h2)))) Define (player-ship%) (class-object% (init-field [image (make-bitmap 30 25)] [x 400] [y 300] [speed 3]) (defined) / Public (received-image) image (defined / public (X-X) x) (defined / public (received-y) y) (defined / private (project) projectile (defined here / public (presenting to DC) ) (Let's send (image received-width) (H (image get-height send)) (Send DC t

python - PayPal Error 10002 Using Permissions API and TransactionSearch -

I have a permission request that looks like this: timestamp, signature = GenPermissionsAuthHeader. getAuthHeader (str (self.username), str (self.password), str (access_token), str (token_secret), "POST", "https://api-3t.sandbox.paypal.com/nvp") # https : //svcs.sandbox.paypal.com/Permissions/GetBasicPersonalData log.info (timestamp) log.info (signature) authorization_header = "timestamp =" + timestamp + ", token =" + access_token + ", signature =" + sign Log.info (authorization_header) header = {"x-paypal-authorization": authorization_header,} url = "https://api-3t.sandbox.paypal.com/nvp" nvp_params = {"method": "transaction Search "," STARTDATE ":" 2012-01-01T05: 38: 48Z ",} r = requests.post (url, data = nvp_perm, header = header) log.info (rtext) self.response .content_disposition = "text / html" self.response.write (r.text) I have access to tokens and to

vb.net - My VB project fails to download an exe file -

I have an update dialog and when the "Direct Download" button is pressed, download it from the dropbox location to an XI file Is used for However, now it does not download the file anymore, and this file is to start after downloading, but it says: The file was not found. The code is: String = Environment such as the DEMAm temp Gatefolder Path (Environmental specialfolder, localAppectionData) & amp; "\ Temp" Try.my.Computer.FileSystem.DeleteFile (TempPath and "\ animeygocardmaker.exe") My.Computer.Network.DownloadFile ("https://dl.dropboxusercontent.com/u/72383434/animeygocardmaker.exe" Hold an exception MsgBox ("An error occurred while trying to download the file"), TempPath and "\ animeygocardmaker.exe"). Try System.Diagnostics.Process.Start (TempPath and "\ animeygocardmaker.exe") Dim Close Close AllWindows as New CloseAll Form1.Pause () CloseAllWindows.CloseAll () And like I said It was always used