Posts

Showing posts from February, 2015

directory - Program to record all file names in a drive -

Is there a program that creates a list of all file names in my drive? I think this file may be a long way in recovery (like more replacement) if I ever get bad drive thanks $ sudo find / This will list all the files from the root file. But, these are not actually your files that are not present on your hard drive Running DF-eh can do something like this $ df -ah File System Size Available Use% / dev / sda1 66G 37G 26G 60% / proc 0 - / proc sysfs 0 0 - / sys None 0 0 0 - / sys / fs / fuse / connection None 0 0 0 - / sys / kernel / debug none 0 0 - / sys / kernel / security udev 3.9G 4.0K 3.9G 1% / dev devpts 0 - - / dev / pts tmpfs 792 m824 of 792 m1% / runs a 5.0 m 5.0 M 0% / run / lock none None 3. 9g 1.6 m3.9g 1% / run / smm binuffut _miss0 0 - / proc / sys / fs / binfmt_misc so that you can try leaving some paths like $ sudo find / | Egrep -v "^ / proc | ^ / sys | ^ / dev | ^ / run" On the contrary, instead of highlighting some files you may fi

html5 - Inline SVG vs SVG File Performance -

I am currently building a website with the help of modern browsers and mobile devices. In the case of performance, & lt; Svg & gt; It is better to inline the HTML directly inside the SVG using or & lt; Img & gt; It is better to use and / or background-image rather than instead. I run gizips on the server to make my content more seconds and I do not want to trust Javascript. inline: at least http request; You can use CSS Frame Properties and change colors; SVG is part of content, so it is clickable and you can insert text; See several lines of irelevant code in your files; If you need to change it later, you can only change one file;

Delphi: TPersistent and csDesigning State -

इस सवाल का पहले से ही एक उत्तर है: < / P> 6 जवाब मैं कैसे टीपीर्सिस्टेंट वर्ग सीडीडिज़िंग राज्य में है? जब कोई डेटाबेस से कार्य करता है, तो एक थ्रेड यदि आप एक अमीर उपयोगकर्ता अनुभव के लिए चाहते हैं तो सहायक रहें आपके मामले में, एक डेटाबेस क्वेरी जो पूरा होने में समय लगता है, लंबी कार्य करने के एकमात्र उद्देश्य के लिए थ्रेड जिम्मेदार होना चाहिए। किसी भी अस्थायी उत्तरदायी फॉर्म को पूरा करने के लिए इस तरह के एक लंबे डेटाबेस क्वेरी के दौरान प्रदर्शित करता है, आपको अपने मुख्य थ्रेड को ऐसा करने के लिए निर्देश देने के लिए अपने धागा में सिंक्रनाइज़ करें का उपयोग करके, मुख्य धागा के भीतर अपने सभी जीयूआई अद्यतनों को करना होगा। ऐसा करने के कई तरीके हैं, लेकिन मैं उस विस्तार में नहीं आता हूं। वीसीएल एक जटिल पुस्तकालय है, और धागा-सुरक्षित नहीं है। आपको कुछ और सब कुछ के साथ सभी इंटरैक्शन की रक्षा करना चाहिए - जो कि कई थ्रेड्स द्वारा उपयोग किया जा सकता है - और उन थ्रेड्स में से प्रत्येक के लिए डिज़ाइन किया जाना चाहिए जो आपके द्वारा कार्यान्वित किए जाने वाले सभी सुरक्

ruby on rails - Uninitialized Constant ConfirmationEmailWorker::Sidekiq -

I have an issue launching a sidekax with the CDI. The current error is: `'Undefined Continuous Confirmation Email Mail: :: Sidekick / Users / Black ExtraLitch / Desktop / Project / Application / Workers / Confirmation_mail_worker. RBA Free: & lt; Category: Confirmation Email Notifier & gt; ' / Users / blackfreelich / desktop / project / app / workers / confirmation_mail_worker. Rbi: My config / application.rb looks like the following, as I was reading curious_loading, that could be the automobile being loaded (though It seems to be repeated because everything in the train is loaded ap / ) file.expand_path ('../boot', __FILE__) is required # You want to select frameworks: "active_record / railtie" is required "action_controller / raillet" required "action_mailer / raillet" "sprockets / railtie" is required "#" rail / test_enuite / Need "# Gems listed in # Gemfile, including any gemstone are re

c - Problems with rs 232 DB9 pin toggling code -

नीचे दिए गए कोड में int ctr, fd, j1; एफडी = ओपन ("/ dev / ttyS0", O_RDWR | O_NOCTTY); J1 = ioctl (एफडी, टीआईओसीएमजीईटी, & amp; सीटीआर); अगर (सीटीआर एंड टीआईओसीएमडीटीआर) {सीटीआर & amp; = ~ टीआईओसीएमडीटीआर; J2 = ioctl (FD, TIOCMSET, & amp; सीटीआर); } Else {ctr = ctr | TIOCM_DTR; जे 4 = ioctl (FD, TIOCMSET, & amp; सीटीआर); } 1) क्या कोई यह बता सकता है कि सीटीआर = सीटीआर | TIOCM_DTR करते हैं? क्या यह सिर्फ डीटीआर पिन की स्थिति को बदलता है? क्योंकि सीटीआर केवल एक इंजियर है जबकि टीआईओसीएमडीटीआर थोड़ा सा है, ठीक है? 2) मैंने टॉगल करने के लिए डीटीआर पिन कॉन्फ़िगर किया है, लेकिन आरटीएस पिन की जांच करते समय भी टॉगल किया जाता है। 3) अब अगर मैं टॉगलिंग के बीच का समय निर्धारित करता हूं, तो कोड काम करता है यदि समय सीमा 1 एमएस से 50 एमएस के बीच, 50 एमएस से ऊपर है, जब डीएसओ में देखा जाने वाला समय 50 एमएस से 100 एमएस और कुछ समय के बीच बदल रहा है यहां तक ​​कि माइक्रो सेकंड रेंज में भी। (टॉगलिंग के बीच इस बार की अवधि एक अलग टाइमर प्रोग्राम के माध्यम से उत्पन्न होती

machine learning - Mutual information for continuous/numeric features -

I want to calculate mutual information for continuous / numerical features. I want to apply the feature selection based on this. Feature set details are given below Feature can assume any value between 1: 1 - 10000 feature 2: Measures are spent at some time - Thus any value can be assumed but Integer (big) .... let me have these features. I am confused in implementing mutual information threads for this, Wikipedia says that integration requires continuous variables. Do I have to exclude facilities before implementing MI? I think you have to separate the features before applying MI When the information benefit applies for feature selection, variable speed continues, a split point is chosen to split the value position for the variable. In different parts, one needs to evaluate all the possible split points to get the best one for the convenience. I think this feature is similar to mutual information for selection, so you can separate the different deviation values ​​from

redirect - PHP Header Location Breaking Google Analytics Goal? -

Our website currently uses Google Universal Analytics to track goal conversions from our own private domain and third party payment processor. Still working. Currently our goal is: / cart - & gt; / Checkout - & gt; / receipt On the / cart page located on our private domain, the user clicks on "checkout" when they do this, / Precheckout , which is a preprocessing script that ends with the header ("location: external.com/checkout"); Exit; Our suspicions lead us to believe that this is the mediator page which is breaking our funnels, which I think when the header ("Location:"); is used and no data is sent to the browser, so it should follow the redirect. What is happening? I can bet that the server does not send the "referrer" header to the browser by changing the location. Try the header ('Referrer: / Cart'); / checkout in . P> Since the user is not clicking anything between the precheckout and

plc - simulator required for Siemens S7-200 -

I need a simulator for Siemens S7-200, which operates with the PC without communication of program logic controller it happens. Version is not online version. Please help me here. was a server instance where you could simulate DB and IO So that customers think they talk to real plc. It was working for the S7 300 and S7 400, so you can check if it works for the S7 200 (because the library supports all of them) though you can not run your PLC application with it If necessary, then you have to try to replicate the PLC behavior with custom PC code.

c# - Interop Excel is slow -

I am writing an application to open an Excel sheet and read it MyApp = New Excel.Application (); MyBook = MyApp.Workbooks.Open (file name); MySheet = (Excel.Worksheet) MyBook.Sheets [1]; // clarification cast is not required here lastRow = MySheet.Cells.SpecialCells (Excel.XlCellType.xlCellTypeLastCell) .ro; MyApp.Visible = false; This takes approximately 6-7 seconds, is it normal with Interop Excel? In addition to this is there a faster way to read excel? string [] xx = new string [last row]; {Int maxCol = endCol - startCol; for int index = 1; index & lt; = last line; index ++) (Int j = 1; j & lt; = maxcol · j ++) {try {xx [index-1] + = (MySheet.Cells [Excel, in the form of Excel] range.) .Value2.ToString () ; } Hold {} if (j! = Maxcoll) xx [index - 1] + = "|"; }} MyApp.Quit (); System.Runtime.InteropServices.Marshal.ReleaseComObject (MySheet); System.Runtime.InteropServices.Marshal.ReleaseComObject (mybook); System.Runtime.InteropServices.Marshal.Rele

visual studio lightswitch - Navigation properties in HTML client with sql server data source -

Visual Studio LiteSwitch 2013, using a SQL Server Data Source, we have a unit A: Regarding other institutions B, 1: B, C, ...; Therefore, there are some navigation properties of Type B, C, ... in unit A ... With the HTML client, after issuing a query for Unit A, Properties B, C, ... All are undefined In the following cases this happens: A data item was added to the screen with related organizations ('Manage edited data' feature 'Edit Query '); Load object on data object object to load visual collection data from programmatically (e.g., screen. Customer.load (false). Then (...)) Data used with the service program 'extension' method (example: myapp.activeDataWorkspace.SqlData.Customers.expand ("address"). Execute (). Then (...) Checking the foreign key fields in the 'hidden' property '_' of each unit example, by inspecting returned data. . Note: Inspecting the requested URL with the applicant shows that the query is correct

Android array result shows in multiple textview -

I am trying to show the result that I got from my array function which has a lot of results in the text view For example, if the result is 1, 3, 5, 7, 9, then each result will be displayed in each text view. How to do this? // This function is used to determine how many pages can be flipped, I used Visual Flapper in this case. RangeValue user input depends on the public int binaryRangePage (int rangeValue) {int flipperPage = 1; While (range value> = 2) {rangeValue = rangeValue / 2; FlipperPage ++; } Return flip page; } Total page = binaryrange page (border mode); // Initialization range 2 dimensional table binerytables = new int [range mode + 1] [total page + 1]; Int n; Int i; Int k; For looping range for // (i = 1; i & lt; = rangeMode; i ++) {n = i; Flippage = 1; // While looping for each page in the View Flipper (n> gt; 0) {Balance = N% 2; BinaryTable [I] [flippages] = Balance; N = (int) monastery. Floor (N / 2); System.out.println ("Remnant [" + I + &q

I need a sql query to match two strings in where clause -

Both 'Html' and 'Blacklist Tables' (two separate tables) have 'IP' text fields. The 'IP' string storage IP address of the existing client. I first want to check if the client's IP address is in the black list and then in the whitelist (if not in the blacklist). Since this string is mailing, '=' operator is not producing the correct result. Also, do not want to use 'like' because I'm looking for exact match instead of pattern. string [] ipPort = txtCIP.Text.Split (new four [] {':'}, 2); String IP = IPport [0]; Con.Open (); //MessageBox.Show ("Open connection!"); String query = "SELECT count (*)" from blacklist WHERE IP = ip; SqlCommand CMD = new SQL command (query, conn); int rowCount = 1; rowCount = (int) cmd.ExecuteScalar (); string wlq = "SELECT SELECT (*) Whitelist WHERE IP = ip"; SqlCommand cmd_wl = New SqlCommand (wlq, con); int rowcount_wl; rowcount_wl = (int) cmd_wl.ExecuteScalar ();

android - ORMLite Join Queries with Query Builder -

Image
I have some problems with understanding the questions in ormlite ormlite query builder 4 supports ways to add. join 1 () 2. joinOr (); 3. leftJoin (); 4. leftJoinOr (); I can agree () shows the joining method () in the following picture. Please allow me to share the same pictures Explain the other ways to use? (I can understand the other pair type in the normal SQL, but when it > Please explain ways to add other similar pictures to me? I spent a lot of time They should be helpful, they explain what SQL is being used and "or" is part. join () sql < code> INNER is similar to JOIN In the form it matches your picture. joinOr () is a SQL similar to INNER JOIN but < code> WHERE parts of two questions meet "ORD" together. The same image as the # 1. leftJoin () Like a SQL LEFT JOIN , it corresponds to add A in the red area and see LEFT JOIN leftJoinOr () is a SQL similar to LEFT JOIN as well but WHER

dns - Is there any way to prevent getaddrinfo from revealing the true IP address of a hostname? -

Let's say there is a program that opens the HOSTS file to ensure that it is not being recalculated anywhere. (It wants to connect to www.example.com but ensures that you do not have entry in the HOSTS file). Instead, you decide to add a DNS entry, so Www.example.com actually indicates 123.123.1.123. So it works. But then the program becomes clever and calls getaddrinfo to ensure that what is being done on 123.123.1.123. Is there a way to hide this information, or to change the IP address of a given hostname in any alternative way? Is there a way to create a normal IP for www.example.com for 123.03.1.123? I think maybe maybe everyone, but I'm wondering what is the better way. Perhaps there is a way to avoid reading the Windows HOSTS file? Or is there a way to cheat the packet, it seems they come from "www.example.com"? (Assuming I have complete control over acquiring / receiving packets on the software) Getaddrinfo () Looks for network name proposals f

c# - MS-Access - You tried to execute that does not include the specified expression 'Quantity' as part of an aggregate function -

I tried to create a new query table containing Products , Product Quantity Strong>, total product value , cost per product , this error is happening "You have tried to execute that does not include the specified expression 'quantity' Has been an overall work " My product is included in the table Unique No Productive Product Name Each Quantity Total Amount 1 P101 Pen-Turbo 40 2 80 2 P102 Notebook 150 1 150 3 P 103 scale 10 3 30 4 p 102 notebook 150 1 150 5 p 101 pen-turbo 40 1 40 Now I need to sell that product which is < pre> ProductId Productname Quantity Total Each P101 Pen-Turbo 3 120 40 P102 Notebook 2 300 150 P103 Scale 3 30 10 I tried this query but received the error SELECT Prod uctId, product, productivity, product Quantity (SM) from the new Equios group help me in this way Thanks in advance. product product, product, SUM quantity ) Quantity, Productivity, Product from Total Amount (Total Amount)

javascript - How do i show if an answer is correct or not -

I'm trying to make a big "you'r right!" On the image of a cat / dog but I do not know how I am guessing that to create a function in Javascript, I know that any answer is correct or not? Codeple link: var question = [['http://i.imgur.com/xKE07.jpg', '1 '], [' http://images6.fanpop.com/image/photos/32900000/Cat-cats-32958715-1440-900.jpg ',' 1 '], [' http://tippvet.com/wp -content / uploads / 2013/05 / cat-vet.jpg ',' 1 '], [' http://www.bubblews.com/assets/images/news/1825371279_1382541931.jpg ',' 1 '], [ 'http://stylonica.com/wp-content/uploads/2014/03/Cute-Dog-Walpaper.jpg', '0'], ['http://upload.wikimedia.org/wikipedia/commons/2 /26/YellowLabradorLooking_new.jpg ',' 0 '], [' http://thestylishdog.com/wp-content/uploads/2009/07/cute-dog2.jpg ',' 0 '], [' http: / /w8themes.com/wp-content/uploads/2013/09/Dog-Computer-Wallpaper.jpg ',' 0

java - Morphia equal ignoring fields -

मेरे पास निम्न वर्ग हैं: @ एंटीटी सार्वजनिक वर्ग लपेटें {निजी मेटाडेटा मेटा ; // और अधिक ...} सार्वजनिक कक्षा मेटाडाटा {निजी सूची & lt; छवि & gt; इमेजिस; निजी स्ट्रिंग मूल्य; निजी पूर्णांक मूल्य; // और अधिक ...} सार्वजनिक वर्ग छवि {निजी स्ट्रिंग यूआरएल; निजी स्ट्रिंग हैश; @ ओवरराइड पब्लिक इंट हैशोड () {int h = 7; H = 89 * h + ऑब्जेक्ट्स.hashCode (this.hash); } @ ओवरराइड पब्लिक बूलियन बराबर (वस्तु obj) {यदि (obj == नल) {वापसी झूठी; } अगर (getClass ()! = Obj.getClass ()) {वापसी झूठी; } अंतिम छवि अन्य = (छवि) obj; वापसी (! Objects.equals (this.hash, other.hash)); }} सामान्य क्वेरी ds.createQuery (wrap.class) .field ("मेटा")। बराबर (अन्य मेटाडेटा); सभी क्षेत्रों की तुलना करेगा ( जैसा सोचा था)। जैसा कि आप कोड में देख सकते हैं, वर्ग छवि ओवरराइड बराबर होती है और क्षेत्र url को नजरअंदाज करने के लिए हैशकोड। यह जावा के लिए काम करता है लेकिन माफिया में कुछ फ़ील्ड्स की अनदेखी करने के लिए एक प्रश्न पूछना (.equal या .filter या कुछ और) का उपयोग करने का एक तरीका है?

node.js - NodeJS Memory Leak when using VM to execute untrusted code -

I am using nodjs to run unreliable code safely. I have seen a huge memory leak which takes about 10 mm of memory on every execution and does not release it. After all, my node process ends up using 500M + memory. After some excavation, I saw the problem in continuous construction of VM. To test my theory, I commented on the code that creates VMs, of course, the memory usage dropped dramatically, I re-dismissed the code again and got global.gc () strategic around problem areas Appeared and divided the node with Exposure -GC flag. It dramatically reduced my memory usage and retains functionality. Is there a better way to clean VMS that I am using it? My next approach is the cache which is the vm with the unsafe code and it is reusing it if I see the unsafe code again (background: I Parsing functions, thus, the unsafe code is often executed or executed once some reference code. async.each (item , Function (i, cb) {// initial reference ... var Reference = Vm.createContext (i

Spring: define and wire a bean in the same class -

How can I set it up using Java config? > For example: @bean public Fu Fu () {New Fu () return; } @Autowired Private Phu Fu; @Bayon Public Bar Bar () {Return to New Bar (FU); } Note: This code returns an error. @in publicfu foo () {return new fu ()); } @Bayon Public Barber () {Return to New Bar (FU); }

ZeroMQ capabilities -

I am looking for solutions to the scenario. Let's assume a service-oriented architecture (SOA) with hundreds of services. Services are completely different from what their API is behind an implementation description. Can different services have different security policies? That is, who can access the service, for example, a service can be completely public, accessible to a subset of employees, may be accessible to the subset of other services. Some services can also be specified at the API level, for example a public service with some internal API calls (Is this a bad habit?). I have touched a little bit on Zimcu but it is not enough to know if this interconnection can be completed with the ZMQ. Any help to decide whether concentration on ZHMQ is to be continued or not will be highly appreciated. Are you asking how to handle security in SOA? Or are you asking if it is possible to make a SOA with 0 MQ? In the past, you need to make it yourself. You need to define yo

string - reading character arrays from a file to another array in matlab -

I have a text file that contains different combinations of characters. For example: a + b * cb + c * ac + a * b I want to read this file in matlab, and want to assign each row to an array like this : c (1) = a + b * cc (2) = b + c * ac (3) = c + a * b Next, I would like to assign other character arrays to A, B, C etc. For example, I print a = 'A', B = 'B', C = 'C' and final output like this Do: c (3) = C + A * b But I'm stuck in both phases, how different character arrays in matlab According to the way to read and allocate different lines. Any suggestion would be appreciated. Read the text in one cell array and replace it one by one. Code %% // The name of your text file is file1 = 'eqns.txt' c = importdata (file1) c = strrep (C, 'one', 'a'); C = Strope (C, 'B', 'B'); C = strrep (c, 'c', 'c') output c = 'a + b * C '' b + c * a '' c + a

ruby on rails 4 - activeadmin carrierwave image hint not displayed -

Hello I am using an active admin with the carrier gem. I am unable to see the preview on the image upload, my image SRC is always always empty. is empty After clicking on Upload button, see the image related URL. My form looks like this ActiveAdmin.register product permit_update: name, description, category_ id,: image form (: html = & gt; {: multipart = Gt; true}). F | F.inputs do "product" f.input: category_id ,: as = & gt; : Select, Archive = & gt; Category all f.input: Name f.input: Description f.input: image ,: as = & gt; : File,: signal = & gt; F.template.image_tag (f.object.image.url) end f.ctions end model class Product & lt; ActiveRecord :: Base is_to: Category mount_uploader: Image, Image Uploader Termination Serializer Class ProductSerializer & lt; ActiveModel :: Serializer Features: ID, name, description, image end My uploader looks like this class ImageUploader & lt; CarrierWave :: Uploader :: Bas

mysql - How do I select specific value using Php and preg_match using comma delimited? -

I am trying to select a certain numeric value that is different than a comma, the values ​​are from a mysql db. I try to use the pillar blast, but I'm not sure how to catch a certain value. Any help would be appreciated. Code $ query = mysql_query ("Select from id_array WHERE id = '$ id'"); While ($ result = mysql_fetch_assoc ($ query)) {$ get_id = $ result ['id_array']; } $ Exact = explosion (",", $ get_id); Assume that you store a comma-separated list of values ​​in columns You are id_array , ie 12,17,44,13 if you blasted the result, then you An array is found form $ is an array correct: ([0] => '12' [1] => '17' [2] => '44' [3] => '13') Now you want to know that 17 is an element of this array. right? You can do this with $ check = in_array (17, $ exact); // True, if found as my example // Please note, finding in strict mode is not important. // 100 test, not in the list

css - Bootstrap "Mobile first" behavior -

Some time ago I certainly do not get "Mobile first default behavior" in Bootstrap 3: < Pre-> / * Extra Small Devices (Phone, less than 768px) * / / * Since this is default in Bootstrap / / * Small device (Tablet, 768px and above) * / @ Media (Minimum-Method: @ Screen- SM-Min) {...} / * Medium Device (Desktop, 992px and above) * / @ Media (minimum-width: @ screen-MD-min) {...} / * Big div This can be the default behavior of the extra small device (large desktop, 1200 px and above) * / @ media (minimum-width: @ screen-LG-min) {...} If there is no break point at 480px? I think the font-size and default for the content, but if for grid systems, want a 6/12 size block between 480px and 768px (col-xs-6), then be 12/12 in less than 480px Can not you just do this after? I need you to explain the concept, because I do not know how this can be a mobile first behavior. PS: I know that community offers stylesheets to get 480 px breakpoints, and I can do it myself, but ac

regex a line from file using python -

I am trying to regex data from a row in the file and fail. I tried to use but failed there too. The code I came up with is: #! / Usr / bin / python3 # To be parsed line: # 1. Ni type = 1 np = 1001 r1 = 1.0 e-0 05 rnp = -1.35602175 pfile = Ni1.pot # parse # 1 ni 1.pot import again f1 = open ("file. Arstric", "r") Pattern = R '(\ D +) \ s + (. *) \ S + type = (\ D +) * \ s pfile = (. *)' Count = []; Atype = []; Boxes = [] for f1 in line: match = re-search (pattern, line) if match: count.append (int (match.group (1))) atype.append ((match.group (2))) apots .append ((match.group (3))) Print (count) Does anyone show me what error I have? You may want to change the pattern like this pattern = R '(\ d +) \. * S * (. *) \ S + type = (\ d +) * Pfile = (. *) ' Because, there is a dot after the first number, so we have (\ d +) \ There may then be more white space characters, (\ d +) \. * S * > Then we use the word, ny (\ d

java - Changing of JDialogs modality to block only one JFrame -

I have a piece of code: Public Waiting (Window Main Window , String string, JFrame stFrame) {interface = new JDIOL (strframe); // dialog.setForeground (new color (100, 100, 100)); Dialog.setUndecorated (true); Dialog.setSize (WAITING_DIALOG_WIDTH, WAITING_DIALOG_HEIGHT); Int x = mainWindow.getX () + (mainWindow.getWidth () - dialog.getWidth ()) / 2; Int y = mainWindow.getY () + (mainWindow.getHyight () - dialog.getHeight ()) / 2; Progress bar .Set offground (new color (0, 128, 0)); ProgressBar.setString ("Loading data ..."); Font font = new font ("serif", font.b.a., 12); ProgressBar.setFont (font); ProgressBar.setStringPainted (true); ProgressBar.setIndeterminate (true); Add dialog.getContentPane () (Progressbar). Dialog.setLocation (x, y); Dialog.setModal (true); } My problem is that, when dialog appears, it blocks all the applications and it is a JFrame StFrame (which is actually a tab ), I want to remove only that tab ( stFrame ) Update:

javascript - How to get selectedRow data properly from table after change the state of ControlWrapper? -

How to get the selected data from the table after changing the state of the loc. Here my table controls the first row (after the dropdown controlling the control to be replaced), but I need 3, then only I get the appropriate line data google.visualization.ControlWrapper ({'controlType': 'categoryfilter', 'view': {'column': [1, 'container id': 'details_category_filter_container', 'Options': {'filterColumnLabel': 'P', 'UI': {'Match Type': 'Any', 'Label' '', 'Caption': 'All', 'Label Stacking': 'A' Satij 'allow typing ": false," allowing majority ": false}},' state ': {' selectedValues': [ 'A']}}); Var table = new google.visualization.ChartWrapper ({'charttype': 'table', 'containerId': 'my_details_table', 'options': {' allowHtml ': true,' alternati

python - Django Grappelli for django 1.5.1 -

I am trying to experiment with django-grappelli with django version 1.5.1 But after setup, for all Greppeli's requirements, I am having the following error in template C: \ Python27 \ lib \ site-packages \ grappelli \ templates \ admin \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ > grappelli 2.4.8 (compatible with django 1.5) is not included before the future, grappelli 2.5.0 (django 1.6c ). Reference Links

windows - How to create Soft symbolic Link using java.nio.Files -

I am making a symbolic link on Windows using an order like this: Cmd / c mklink / j "$ {linkNameCanonicalPath}" "$ {targetFolder.canonicalPath}" from Groovy and using Runtime.getRuntime (). Exec () method This is working fine, but I want to use it in the java.nio.Files.createSymbolicLink () method. But I always get the same error message: java.nio.file.FileSystemException: Customer does not have an essential privilege the current user's For the mklink / j command works and I want to avail the privileges Windows (W7) Along with, you can add to the list of users who can create a symbolic link (without disabling UAC) using security policies. Es. Run secpol .msc Visit Security Settings. Local Policies | User Rights Assignment | Make a symbolic link Add your username. Restart your session.

ruby on rails - Add fingerprint to old paperclip attachments -

I use paperclip for attachments on my model. I recently added a fingerprint for the attachment, it works fine with new attachments, but this does not add to the old ones, because of this, because of the problem of reprocessing attachments to add a new style to me Is happening, because the paperclip tries to find the attachment with fingerprint and not one of the attachments. Is there a way to add fingerprint to old attachments? The error is that I have reprocessed old attachments: Erro :: Anoint: There is no such file or directory - / TMP / paperclrip-repris20140422-1036- nl9gxk < / Code> [edit] Have you tried? $ rake paperclip: refresh class = Model_Name_Goes_Here [/ edit] If you do not have too many images The simplest way, I can think: Dir.foreach ('/ path / to / dir / that / contains / old / images'). Items | Next if item == '.' Or item == '..' file = file.join (File.expand_path (File.dirname (__ FILE__)), item = thing.image

userinfo in HTML href -

I have noticed that when I use the userinfo part (user: password) in an html attribute such as href or src , Chrome Dev Tools are going crazy. For example, if I go to http: // localhost: 8080 and the HTML of the document displayed includes: & lt; A href = "http: // kaczka: dziwaczka@google.pl" & gt; Yo Mama & lt; / A & gt; then dev tool on hovering or copying the attribute tool value, yield http: // localhost: 8080 / http: // kaczka: dziwaczka@google.pl . However, the link works only when any click is made. Does anyone know that this is an issue with Chrome Dev Tool or some deliberate feature? If this is intentional, then why does this happen? No, this is not by design, but this type of URL has never been completed correctly Generally, this type of credentials specification has been disliked - instead use authorization HTTP (see more).

javascript - Random link and once one is shown, I don't want it to show up again -

I'm a novice to do all this, so my question is. I have three different websites what I want to do; When people click on the link, one of them is randomly selected and shows that later on when they click on a button in the website, they will take them randomly for one of the other two, so that He has not been shown beforehand. thank you in advanced. How would you do this in Java, but you could have a different language If you want to do this on a website then you want PHP or JavaScript. public static zero display site () {random random = new random (); Boolean [] passed = {false, false, false}; String [] website = new string []; // Websites irregular to websites while (true) {// will use a pause statement int website = random.nextInt (2); If (near [website] == wrong) {// This website has not yet been shown. System.out.println (website [website]); Passed [website] = true; } // input and possibly break statement see here }} Call that method every time you want to displa

actionscript 3 - Can I add several sprite children with the same index? -

मुझे एक सूचक स्थान पर 2 sprites चाहिए Sprites के पास अलग-अलग निर्देशांक ( x विशेषताओं) हैं, इसलिए, उनमें से प्रत्येक बच्चे की स्थिति सक्रिय होने पर दिखाई दे सकते हैं। स्पष्टीकरण, कोड: addChildAt (sprite1, 1); AddChildAt (sprite2, 1); क्या दोनों प्रेइट्स दिखाई दे रहे हैं? नहीं, आप नहीं कर सकता। लेकिन आप आसानी से दृश्यता को नियंत्रित करने के लिए माता-पिता और बच्चों के बीच अतिरिक्त प्रेत जोड़ सकते हैं नमूना: parentSprite.addChild (अतिरिक्त) extra.addChildAt (sprite1, 1); Extra.addChildAt (sprite2, 2);

symfony - foreign key reference symfony2 -

मुझे एक विदेशी कुंजी के सिद्धांत संदर्भ में एक समस्या है src / Application / Sonata / UserBundle / src / acme / adressebundle के संदर्भ में विदेशी कुंजी है, इसलिए मुझे यह त्रुटि मिली: [सिद्धांत \ ORM \ मानचित्रण \ MappingException] लक्ष्य-इकाई आवेदन \ सोनाटा \ उपयोगकर्ता बंडल \ इकाई \ एड्रेससे 'अनुप्रयोग \ सोनाटा \ यूज़रबंडल \ इकाई \ उपयोगकर्ता # एडेड्रेससे' में पाया नहीं जा सकता है कि तर्क यह त्रुटि दिखाता है कि दो संस्थाएं नहीं हैं एक ही बंडल में तो मैं 'अनुप्रयोग / सोनाटा \ उपयोगकर्ता बंडल \ इकाई \ एड्रेससे' से 'src / application / Sonata / UserBundle' से संदर्भ कैसे कर सकता हूं कैसे के बारे में / ** * @ManyToOne (targetEntity =" Acme \ AdresseBundle \ Entity \ Adresse ") * / निजी $ idadresse; दिया गया है कि Adresse Acme \ AdresseBundle \ Entity नामस्थान में है

An adapter for GridView with 2 type of view (android) -

Image
I want to create an adapter for Gridview, in which 2 types of view encoding are in the position of the item first item for grid 1 One view of the column and 2 should be in the second view of the column. I do not know whether I should customize the grid view or just put it in the adapter. This is an example of the result that I want Please need your help This is probably the answer you want to hear, but the easiest way to do this is to use ListView instead of GridView you have 2 different W To complete this, create a new adapter which extends one of the list adapters classes, the standard < Use code> ListView conventions. Overvride getView (int, view, view graph) so that it returns the correct view based on the situation (first argument), and then it will return the correct view for each item in your list. You have to manage the relationship between the entries in the list and whether it is wide or normal, but it should not be too much a deal.

javascript - Creating a link to a certain marker on a google map -

I use this example to implement a Google Maps Store Locator: It works fine But I'm trying to show in the list instead of the drop down list in the actual ul I've changed the results to show the result as li but I Link can not be found to work It is currently linked to the selected option in the dropdown, but I Instead every li links I want to make it requires a little change I: function load () {map = new google.maps.Map (document.getElementById ( "map"), {center: new google.maps lots Long (53.438065, -1.823730), Zoom 4, map Taipiid 'roadmap' map type Kantrolopts: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}}); InfoWindow = new google.maps.InfoWindow (); Choose Location = Document. GetElementById ("Choose Location"); LocationSelect.onchange = function () {var markerNum = locationSelect.options [locationSelect.selectedIndex] .value; If (MarkerNum! = "None") {google.maps.event.trigger (marker [markmarknum], 'cli

google cloud messaging - GDK Immersion/Live Card push notification -

Is there any way to send push notifications to a native GDK immersion application (or for livecard based applications)? As far as I've read, Glass does not support GCM push notifications for game services - is that right? We have server-side events in our application, which need to be answered by the application. I have seen any samples of this nature using the mirror API. I've seen some people making hybrid applications, where they push a card using the mirror API and it opens the original application (using a custom URL protocol). It seems a bit cumbersome for me and I want to see that there was no better way to do this. For any of our specific requirements, I do not see in any way that any user coming into the application of our immersion will be informed of updates, bar closures and periodically see the new card. You are right that GCM requires Google Play services, which is available on the Glass as the XI 16 Not available, but some work is around. You can di

javascript - Slide div when page loads -

I need to create a function that will raise the sliding device from left to page when the page loads. It requires about 5 seconds of animation delay. Example can be seen on this link There is a section with the share under the title, to make that function Required to slide items which are summarized for all numbers. It is located on the right side with gray background. Hey, I'm not a CSS expert, but the site is what people are making a little bit more than CSS. So I made this JSField. It can help you. I'm not sure that they are working in all browsers till now. You can use jQuery as the backbars for browsers which do not support CSS3 Transition I have the code used: div {width: 100px; Height: 100px; Background: Red; Transit-property: margin-left; Transition period: 2s; Webkit-Infection Property: Margin-left; / * Safari * / -bbkit-transition period: 2s; / * Safari * / Margin-left: -100px; } Div.active {margin-left: 0 pixels; } Code is: jquery code: $ (function

javascript - Display legend for every series with Dygraphs -

Image
I am providing several free time series with Dygraphs as described here: < / P> The graph is sung correctly: However I want to show the mythology the value for each series. Now the value of the closest point of the cursor is displayed for now. How can I fix this? There is no built-in support for this. For the Tigrof, a selection always has a specific x-value, with a different X-value, there is no concept of a set of digits that are all selected. It is being said that you can roll your own legend using Highlight callback and unhighlight callback for an example of someone who did this.

wpf - Visual Studio 2012 XAML Designer hangs often -

I have a serious problem with Visual Studio 2012 XAM designer which is often hanging in these situations: Edit in the designer and then edit a value in the text editor or vice versa (often) copy / paste operations (especially in the text editor, ResourceDictionary Item with) (often) Change to other XML document (abnormal) I have the same There is a solution that is killing the xdesproc.exe process in the task manager (if I do not do it, it will take 15 minutes to work again), but if I have many XM files So I need to spend some time with the designer because the text editor is hanging even when the text is loaded. Very upset, and I did not have this problem with Visual Studio 2010. What could be a viable solution to this problem? - A little lost and found

javascript - Element width in chrome using jquery -

I need element width before adding body. The following script is working fine in Firefox but google chrome & lt; Style & gt; Not in .testDiv {width: 150px; Height: 100px; } & Lt; / Style & gt; & Lt; Script & gt; Var div = "& lt; div class = 'testDiv' & gt; Divive content & lt; / div & gt;"; Warning ($ (div) .width ()); & Lt; / Script & gt; It outputs 150 in Firefox and 0 in Chrome I have also tried $ (window) .load (function () {warning ($ (div). With ());}); but it is doing the same thing ... Update: If I declare CSS inline this works but CSS class var div = "& gt; div style = 'width: 150px;' & Gt; Divise Content & lt; / div & gt; "; Warning ($ (div) .width ()); This may be the reason, if your device has in-line CSS, it Will display your width correctly. Maybe CSS property does not load in Chrome

javascript - Sending visitor to different page depending on window size -

I've done 3 different pages for 1024, 768 and 320 widths. What is a way to send visitors to the right page, depending on your screen resolution? The reason for this is that I am not creating a responsive site that includes a media player that does not optimize the correct ratio: ( thanks in advance :) / excel Window to find the height and width of the browser's window size. Use the screen object. You should do this, & lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Untitled document & lt; / Title & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var width = screen.availWidth; // Now before comparing make sure you have only integer value width = parseInt (width.toString ()); Var path = &

http - python-requests - Sending via POST form with square brackets names doesn't work -

I was trying to send server [key1] = val1 and test [key2] = val42 to a server via I am Related HTML: & lt; Input type = "text" name = "test [key1]" value = "val1" /> & Lt; Input type = "text" name = "test [key2]" value = "val42" /> (By the way, I would like to know the correct name for this type of form.) & gt; & Gt; & Gt; Import request, JSNA & gt; & Gt; & Gt; Parameters = {'test': {'key1': 'val1', 'key2': 'val42'}}} gt; & Gt; & Gt; R = requests.post ('http://httpbin.org/post', data = parameter) & gt; & Gt; & Gt; Json.loads (r.text) ['form'] {u'test ': [u'key2', u'key1 ']} The post data has been flattened, We got the keys, but the values ​​were lost val1 and val42 I thought the embedded key was not so is. You have to type the parameter with square brackets. &

android - Swipe tabs with Action Bar -

Image
I'm experimenting with ActionBar ViewPagerIndicator or ActionBarTabs. It consumes a lot of space. I have created a custom layout for the action bar, but it is not working well for the tab. I should look like something down like I think I can get some logical errors in your code. What are you trying to do, there are two concepts in this, first you have to know about working with the action bar () and working with tab layouts with second swipeable sequences (learning two concepts) If you try to sync it, you will get the desired result.

How to use java-object-diff library to compare object graph involving one-to-many relationships implemented using lists? -

Text after "div class =" itemprop = "text"> I have been working in 'complex objects' under different graphs, and 'base' copies to compare and one Make changes logs. From Stackoverflow, I saw that java-object-diff library () can work for me, I've skimmed through available documentation / examples, but I'm still not clear about this: 1. How does it compare to the collection? 2. Is the order of items relevant in the collection? 3. How can 'equal' methods be used instead of introspection? For example, if I have 'user' and 'role' object then the user can have multiple roles both override the 'equal' method using both their identifiers. Can compare different copies of users with related roles? After Comparison is compiled using its items and hash code methods for each item A so-called DiffNode and will be represented by either inscribed , marked by added , deleted or Change . If an object (w

Scala bring value into implicit scope without naming it -

When using, I inherent scope for each domain type JsonFormat [A] to get The requirement is A that I want to serial. to create a custom object with all implicits as recommended approach fields: object MyJsonProtocol expansion DefaultJsonProtocol {contained Val colorFormat = jsonFormat4 (color)} import MyJsonProtocol._ My app is a great many domain types, some of which have a long name. I MyJsonProtocol is getting long and unreadable: object MyJsonProtocol extends DefaultJsonProtocol {... // There are many more built-Val someClassWithALongNameFormat = jsonFormat4 (SomeClassWithALongName) built-Val SomeClassWithAlongNameInnerFormat = jsonFormat4 (SomeClassWithALongNameInner) built-in Val someClassWithALongNameVariantBFormat = jsonFormat4 (SomeClassWithALongNameVariantB) ... // here many more} There are various problems with long val name: < Li> They feel nonsense (name is never read) They make my lines very long They introduce copy / paste risks that th

matlab - How to prevent a decimal number being rounded to a whole number? -

I am using this code to get numerical data from the file I am reading: [filename, pathname] = uGateFile ('* .txt *', 'file to study'); Then it can be used to import% file from full file file = fullfile (PathName, file name)% fullfile keeps path and file name in a file; A = []; Fid = fopen (file); Tline = fgets (fid); Whereas ischar (tline) parts = textscan (tline, '% d;'); If the number (parts {1}) & gt; 0 A = [A; Parts {:} ']; End tline = fgets (fid); End fclose (fid); X = A (:, 2) Y = A (:, 7) It works fine, but I am doing this issue: when the numbers are displayed in the command window Those whole numbers were scored by number with decimal digits for example:. 165,98 166,38 166,78 167,18 167,57 167,97 168,37 168,77 169,17 169,56 169,96 170,36 170,76 171 , 16, 171,55, 171, 95 For this: <161 code> is there some variation I could do in my code to show the original data, but to complete the round numbers?

jquery - Internal server error 500 while ajax call -

I'm trying to call this method: // POST: / Producer / Delete / 5 [HTTP Post, ActionName ("Delete")] Public Action Result Deleted Confirmation (Int ID) {Producer Producer = Unitofwork. Productive Repository. Get BIID; UnitOfWork.manufacturerRepository.Delete (creator); UnitOfWork.Save (); Return Jason (new {ok = true, newurl = Url.Action ("index", "creator")}); } with this Ajax: $ Type: "Post", contentType: "application / json; charset = utf-8", header: {'Ajax ({url: "/ creator / delete" "+ $ (' # Id '). Val () RequestVerificationToken ':' @TokenHeaderValue () '}, data: {id: $ (' # id ') .val ()}, error: work (data) {warning ("error" + data);}, success: work (Data) {if (data. Ok) {$ ("# model"). Modal ('hide hdm (data);}}}) I checked in Fiddler and I I can see that the ID has passed correctly. I have a break point at the beginning of a method but t

php - Inserting data into a sql query from a text box in a html form -

का चयन करें ticketDescription, ticketTimeDate, ticketCategory, ticketServerity, user.userLocation, user.userFirstNames, user.userSurname, उपयोगकर्ता। userDepartment, user.userContactNumber, user.userEmailAddress टिकट बाएं से शामिल हों ticketHistory पर ticket.ticketID = ticketHistory.ticketID वाम ticketHistory.technicianID = technician.technicianID वाम उपयोगकर्ता शामिल हों पर तकनीशियन शामिल हों पर ticket.userID = user.userID कहां ticketResolved = '0' और तकनीशियन। TechchnicianID = '1' मैं पूर्णांक को बदलने की कोशिश कर रहा हूं जहां एसक्यूएल क्वेरी तकनीशियन आईडी के आधार पर परिणाम लौट रहा है। (अंतिम पंक्ति) मैं '1' को टेक्स्ट बॉक्स से मान के साथ एक html फार्म पर बदलना चाहता हूं, जिसमें उपयोगकर्ता भर जाएगा और सबमिट करें पर क्लिक करें। फिर HTML फ़ॉर्म की ऐसी गतिविधि में टेक्स्ट बॉक्स से मूल्य डाल दिया और technician.technicianID = ' **' जहां पाठ बॉक्स के मूल्य की जगह लेंगे ** । लगता होगा काफी सरल है, लेकिन मुझे पूरी तरह से स्टम्प्ड है! आप नीचे दि

json - Connecting to HBase using Rest Services -

I followed the tutorial and tried to communicate on HbZ using JSON and Rest Services. I have Claudera Distribution CDH 4.6 HBbase Edition HBS-0.94.15 + 86 I have the following link (60000 is a port where HBZ is running on CDH4 VMware machine. Is the table) http://192.168.26.128:60000/ location (using the mill) It is mentioned in the following link, it should Get all the table data in JSON format I found the following error: org.apache.hadoop.ipc.RPC $ version Match & gt; Server IPC version 3 can not communicate with client version 47 I can not understand where the mismatch is happening? Am I doing something (or maybe everything) wrong? Please tell me in the right direction Also, is the REST service, which is already installed on the CDH or do we have to install it? A detailed answer on the basics or any link from the document will be very basic step by step to be deemed very useful. I was trying Google and got lots of stuff, but nothing was not able to work

html - Opacity and z-index in elements -

I have a site with a dropdown menu when the menu is expanded, then it goes behind something that I I am at Li is the z-index 10 and currently does not have z-index in hanging ul but it has ambiguity: 1 in it has tried all combinations of notable elements and jade indexes , But I can not do this work as expected. I want Lee to be behind Lupdau ul when it spreads. Lee is a relatively situation (my design is needed) and a float property is the only way I can do this using z-index: 1 for li, but I Do not want any ideas as it gets spoiled with some other elements? If you want to use the z-index property, / html>

javascript - Switching div content with another div content position -

I'm surprised that Drop Dev is a way of changing the position of dragable div material with the position of content. I have 6 draggable devices that have IGG and P tags that are more important in I want to drag on another device Firstly it should look: To switch After: $ (drop object). Druggable ({axis: "x", zIndex: 100}); You can use the sortable feature of the jQuery UI There are dragable . $ (".selector"). Drug Gable ({connectToSortable: "# my-sortable"});

ios - UICollectionView select cell at indexPath while reloading -

I have a collection view to show photos from the server. The download is slow on the server and I want to show the newly downloaded photo Every time this code to in CollectionView I reload, while the photo download for (int x = 0; x & LT; thumbsLink. Count; x ++). {NSData * Data = [NSData DatyWid content of URL: [NSDR URLWithString: [Ring Objects Object: X]]]; UIImage * image = [UIImage imageWith data: data]; Dispatch_assink (dispatch_gate_man_quoo ()), ^ {[thumb-piece object: image]; [Self-dependable reload data];}); } It works well, but I can not select the cell for the row on the index path until the downloading is complete. How can I select a cell before downloading to see downloaded downloads? After Because you have worked on main thread instead of async threads. You should change your code to: class offslack * __wec weaklels = self; For (int x = 0; x & LT; thumbsLink.count; x ++) {dispatch_async (dispatch_get_main_queue (), ^ {NSData * data = [NSDa

java - Why method is not throwing Exception -

इस पद्धति में मैं SessionFactory.openSession () का उपयोग हाइबरनेट सत्र : सार्वजनिक स्थिर सत्र getSession () {सत्र सत्र = शून्य; अगर (कारखाना == रिक्त) {session = init सत्रफ़ाइनर ()। OpenSession (); // initSessionFactory () SessionFactory ऑब्जेक्ट देता है } और {सत्र = कारखाना.पॉप सत्र (); } वापसी सत्र; } के बाद से, विधि हाइबरनेट अपवाद फेंकता है, तो मेरी विधि एक अपवाद फेंकता क्यों नहीं, कोई भी संकलन समय त्रुटि क्यों नहीं है? < / Code> क्योंकि हाइबरनेट एक्सपॉशन केवल रनटाइम एक्सपैशन जैसे NullPointerException < पी> विरासत पदानुक्रम है रनटाइम एक्सपॉशन -> नेस्टेडटंटम एक्सेप्शन -> हाइबरनेट एक्सपॉशन

JQuery Datepicker Dates -

What do I want, when blank presses, display only June Calendar and highlight from 2014-06-01 to 2014 - Disable 06-07 or remaining dates. I have seen the post about light illumination and have tried things without success. I would be glad that if someone can help me and be ready for it once, thank you in advance, that I have What is: & lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" /> & Lt; Title & gt; JQuery UI Date Picture - Local People Information & lt; / Title & gt; & Lt; Link rel = "stylesheet" href = "http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" /> & Lt; Script src = "http://code.jquery.com/jquery-1.9.1.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://code.jquery.com/ui/1.10.1/jquery-ui.js" & gt; & Lt; / Script & gt; & Lt; Script src = "jquery.ui.datepicker-es.js"

javascript - Getting initial object from promise -

I want to access the original jqXHR object in the form of $ .jax (ajaxOpts), is it possible in some way ? I now make a promise. var jqXHR = $ AjaxOpts .done (dfd.resolve) .fail (dfd.reject). Then (next, next); to: jqXHR objects return $ .ajax () implement the promise interface as jQuery 1.5, giving them all the properties, methods and behavior of the promise (see the deferred item for more information) You can already get a jqXHR object (which is a superset of the XMLHTTPRequest object) it only applies the promise interface. var jqXHR = $ .ajax (ajaxOpts); Console.log (Typef jqXHR.abort); JqXHR.done (dfd.resolve) .fail (dfd.reject) Then (next, next);

c# - Cache: expire data when table data changes -

Is there a way to store this data on the client side in the cache and eliminate the data from the cache, when only two Updated / Rows of tables? I need to load the menu with the correct permissions from the database, when no permission is changed On the current implementation, menu item loads from the database in the tree weigh each time the page loads. So is there a direct way to accomplish this? Because I can not use sliding ending and complete termination because I do not know when the administrator will change user's rights. Regards Yes, there is a way to do this. This is called SQL cache dependency and the whole technique is included rather. Great tutorial on the same topic.

encoding and deconding utf8 string and its bytes in java -

I am working on a project for which I have to encode a string code in java and encode it. My string is a UTF-8 string that meets the Persian character. I just want to x-ray each byte with a constant character and then want to re-write it with the same stable character I wrote the code below, but it works completely wrong! ! I see it with an English character and it works How can I fix this problem, thanks in advance! string str = "c"; Four keys = 'n'; Byte BK = (byte) key; Byte [] B = str.getBytes (); For (int i = 0; i & lt; B. laugh; i ++) {b [i] = byte.valouf (byte) (b [ii] ^ bkA); } String str1 = new string (b); B = str1.getBytes (); For (int i = 0; i The problem is coming when you make str1 with mut1 bytes. When you enter string str1 = new string (b); If there are some bytes in UTF 8 encoding, then please make a good string for me. But because you've exchanged the bytes, the encoding is invalid UTF 8, and Java does not know much about it.

ios - Change brightness of an image via uislider and gpuimage filter -

I wrote this code to change the brightness of a UIImage through a UISlider and GPUImageBrightnessFilter. . But every time I test this app crash my code: - (IBAction) sliderBrightness: (ID) this {CGFloat middle = [(UISlider *) sender value]; [(GPUImageTiltShiftFilter *) GlitterFilterSetFontsWeekly: Midpoint- 0.1]; [(GPUImageTiltShiftFilter *) Bright Filters SetBottomFocusLow: Midpoint + 0.1]; [SourcePicture processImage]; } - (zero) glowfilter {UIImage * inputImage = imgView.image; SourcePicture = [[GPUImagePicture alloc] initWithImage: inputImage easily optimized for software: Yes]; Glowfilter = [[GPUImageTiltShiftFilter alloc] init]; // Sepia filter = [[GPUImageSobelEdgeDetectionFilter alloc] init]; GPUImageView * imageView = (GPUImageView *) self.view; [Brightness filter force processing transition: imageView.sizeInPixels]; // Now need to run the filter at small output size [sourcePicture addTarget: brightnessfilter]; [Brightness filter add-target: imageview]; [SourcePicture

CouchDB car sale example, possible or not? -

I was explaining to a friend how great CouchDB was and I was really doing a lot of good work when Until he asked me if you can do a car sales database, after giving a lot of consideration, I have no answer, I think it is impossible. My dilemma is similar. Let's say that a car has owner_id, manufacturer, year, type, color, million and price. My first initial thought was to throw all the keys, but you can search blue or red or yellow and with 30,000 and 80,000 miles and with some price range. And given the question, what if you do not search for color? The only way I can think, is that she is doing a lot of queries, and is doing manual brute force defrayer array in my database layer code. So, is it possible to do it in a viable way? CouchDB is designed for scalability, and limitless flexibility -Hock queries are not scalable, so it's discouraged. It is is possible, with temporary scenes. As a JSON object for / db / _temp_view you can do your view (query) PO