Posts

Showing posts from April, 2011

ruby - Compressing using Bzip2 on-the-fly to a file? -

is a program that generates large CSV files, for example: arr = (0 .. 10) .to_a CSV.open ("foo.csv", "wb"). Csv | (2 ** 16). Times {csv & lt; & Lt; Arr} This will generate a large file, so I want to compress on-flyer , and instead, Compressed CSV file ( foo.csv ) outputs output to a Bizip-compressed CSV file ( foo.csv.bzip ). I have an example of "Ruby-BGIP 2" gem: writer = BGP :: author. new file. Open ('file') author & lt; & Lt; 'Data 1' author.code I'm not sure how to write BGP2 from CSV one. You can also create an CSV object with IO or IO Something like enough, such as Bzip2 :: Writer . For example file.open ('file.bz2', 'wb'). F | Author = Bugz :: Author. The new CSV (author) does. CSV | (2 ** 16). Times {csv & lt; & Lt; Arr} End Writer. Closing

graphics - Vijual tree graphs -

I have gone through some issues in trying to use the Draw-tree function. First of all, I am unsure if I am using the correct namespace (: Required Required: Reloaded) because I have not been able to attract any tree. I have tried (requires vijual.graphical) , but it was not recognized. It does not recognize the draw-tree , meaning that the compiler is unable to resolve the expression symbol. The nodes of the trees should be in accordance with n-tuples and in the case below, 3-tuples. Seen as input (def foo (draw-tree [[: vec (9/2 6 13/2) [[:: vec (1 2 3)] [: vec ( {: vec (9/2 6 13/2): correct {: vec [7 9 9}} ,: Left {: right {: vec [3 4 5]},: left {: vec [1 2 3]} ,: vec (2 3 4)}} Dependency I I am [org.clojars.overtone / vijual "0.2.1"] . If you are on a repl, then it should work: (Def Foo (Draw-Peri .... Use your Refers to other namespace symbols in the current namespace so that you can find them suitable You need to load the name space but ...

objective c - With typedef enum, return type enum EnumName produces compiler error when returning an enum member -

मेरे पास एक enum है टाइपिंगफ़ enum {kOne, kTwo, kThree, kFour} Enums ; और, मेरे .h फ़ाइल में मेरे पास - (enum Enums) getEnum; मेरी .m फ़ाइल में मेरे पास - (enum Enums) getEnum {return kOne; } हालांकि, मुझे त्रुटि मिल रही है असंगत परिणाम प्रकार 'enum Enums' के साथ एक समारोह से 'int' लौट रहा है मैं एक एंमाम में लौट रहा हूं इसलिए मुझे यकीन नहीं है कि त्रुटि क्या है। आपकी विधि हस्ताक्षर होनी चाहिए: - (Enums) getEnum;

php - Cant add new record to database -

I am trying to add new records to my database via php but I can not get it to work I have triple examined all my values, correct table / row names, but still not working, maybe a second pair eyes can see my problem. This is my form ... & lt; Form action = "method =" POST "& gt; & Lt; Table cellpadding = "5" cellspacing = "2" border = "0" & ​​gt; & Lt ;? Php echo '& lt; Textarea name = "addname" cols = "20" rows = "1" & gt; Enter new name & lt; / textarea> '; Echo '& lt; Textarea name = "adddescription" cols = "110" line = "5" & gt; Enter new details & lt; / textarea> '; Echo '& lt; Textarea name = "addpagetitle" cols = "100" rows = "3" & gt; Enter new page title & lt; / Textarea> '; Echo '& lt; Textarea name = "addpagetags" cols = "10...

html5 - Javascript Method to detect area of a PNG that is not transparent -

Image
I'm looking for a JavaScript method to detect an image within a transparent PNG, for example, I have 9 40x680 I will make a PNG with a transparent canvas, then I will place a complete opacity object somewhere within that canvas. I want to be able to locate the size (H / W) inside the canvas, and top + left position Here is an example of the original image Here's an example of what I would like to achieve. (Bounding box overlay with bound margin data) Ive found a resource that detects some transparency, but I'm not sure how I'm seeing something like this. var imgData, width = 200, height = 200; $ ('# Mask'). Bind ('mausomov', function (if) (if (! ImgData) {init kanvas ()}} var imgPos = $ (this) .offset (), mousepause = {x: ev.pageX - imgPos.left, y: ev.pageY - imgPos.top}, pixelpos = 4 * (mousepos.x + height * mousepage), alpha = imgidata [pixel piece + 3]; $ ('# opacity') .text ('opacity =' + ( (100 * alpha / 255) & l...

What is the maximum results returned for YouTube Data API v3 call -

reference The process of providing some advice on an HTTP GET using the YouTube Data API I am V3; To get a list of results from YouTube, to develop a specific CATEGORY, or a Windows based application for a specific tag. We are open to using any programming language (I have a C ++ background and I am hoping that you can join the YouTube Tube SDU SDK Directly support HTTP connections without using them. (There should not be a YouTube API quota problem once in a month). The problem We have some web developers Are being told That YouTube API v3 will only return a maximum of 500 records / results, because a query that is a total viewer, link to the video, and original meta data such as. S, say "house music" or I would like to find 5000 results for "basketball" - and I might have a developer etc etc, would it be possible? If so, what fields do I have to get (like "max_slots_page_page" )? Thank you. The API will not provide more than ~ 500...

html - Go to random page in Javascript -

I want to program a button with a button, when I press it, one of the pages (from the list Javascript code should be opened randomly How do I do this? Thanks a lot! OK, let's see. Math.Random () , which will give you a random number between 0 (inclusive) and 1 (exclusive) window.location , a property that you specify the URL to take to the browser on a new page Array, which can contain a string, which is a URL Put them together, and you have The ability is to select a URL at random (using the Math.random , from the array) and to go there Aujhr tell.

sql server - DNN5 Shows Under Construction -

Image
I recently upgraded my PC from Windows 7 to Windows 8.1 and now to reset my local DN5 environment There is a problem in I pulled the example of my DN5 from remote GIT repo, and ended up importing all the tables / data / stored procedures for a local instance just from Production DB. I have updated the connection to the Web.config wire to reflect my new database, but still, whatever I do, give me the http: // localhost / DNN5 / Install Redirecting to /UnderConstruction.htm . What am I missing? For completeness, here is my connection string and a screen of my DB is Caribbean: & lt; connectionStrings & gt; & Lt; Add name = "SiteSqlServer" connectionString = "data source = KMCNUTT-7 \ DWYATTMSSQL; initial catalog = DN55; user id = SA; password = ******" provider name = "System.Data.SqlClient" / & Gt; & Lt; Add name = "DNN5ConnectionString" connectionString = "Data Source = KMCNUTT-7 \ DWYATTMSSQL; Initial Cata...

sql - Oracle Query Date Range -

This query takes 16 minutes is there a faster way? INIT.MPI_MEMHEAD.MEMIDNUM is selected from INIT.MPI_MEMHEAD at INIT.MPI_AUDHEAD INIT.MPI_AUDHEAD.audrecno = INIT.MPI_MEMHEAD.CAUDRECNO where INIT.MPI_AUDHEAD.audctime +0) & gt; = To_date ('01 -JAN-14 ') and (INIT.MPI_AUDHEAD.audctime + 0) & lt; = To_date ('01-APR-14 ') First of all, you "( INIT.MPI_AUDHEAD.audctime + 0) & gt; = to_date ('01 -JAN-14 ') and (INIT.MPI_AUDHEAD.audctime + 0) & lt; = to_date ('01 -APR-14') "to" Code> Where INIT.MPI_AUDHEAD.audctime between date '01 -JAN-14 'and date '01 - APR-14' ". Second, if you have INIT If you want to always select this table in one quarter by MPI_AUDHEAD.audctime, you can change this table in a partition table by auditing it. As mentioned below: create MPI_Oddhead (Audit Date) range by audit (overtime) (less than the Partial payment payment value (TO_DATE ('2014-01-01 00:00:00...

math - Ruby while loop only executes once -

This code is not working. I am trying to code the codeet, but the code is only for input Runs 1 time It prints from 4, 1, 1 and it shows that it only moves for one step. The second block is never executed Can someone tell me what is wrong with this Ruby Code? I do not know how this is not working. Collatz def collatz (number) if number == 1 return 0 end phase = 0 while the number> 1 If the number% 2 == 0 number = number / 2 number keeps the step, step = moves + 1 step and the second number = (number * 3) + 1 puts number phase = step + 1 puts the step end return Step End End Step = Collatz .new.collatz (8) puts the end of the phase You have a return statement that is executing the executable after the loop first runs. Try Square Collatz def collatz (number) 0 if number == 1 step = 0 while the number> 1 if the number% 2 puts the points == 0 / = 2 puts the step + = 1 and the number = (number * 3) + 1 puts the step + step = end end of the end phase phase end = coll...

linux kernel - Rootfs on SD card -

I have a device on which I have a 3.10 Linux kernel that boots from the busybox (initramfs) When I removed the Busiebox filesystem image on the SD card and when I modified the root in / dev / mmcblck0p1 from root = / dev / ram, then it still boots up to the shell so busybox works fine But if I try to use any other FS kernel crashes ... h I try to generate the rootfix using debootstrap () and I have removed the new rootfish on the SD card. I get an error saying that "failed to execute / sbin / init" I have checked that the file exists and has checked permissions and I like it. What could be the problem? WRT rootfs I'm particularly new I was thinking that an FS can be mounted on the SD card but it does not seem that this is the case. I guess / sbin / init is doing whatever the device is up to? What am I trying to do? --- & gt; I need to create roufs with some packages and libraries (GCC Python etc). What will be the general perspective? I have also tried t...

python - Django Templatetag, request username -

In a template tag, in the template I am using request , I Trying to get the user's username by using {{user.username}} . When a similar code is not used in a template tag, but works in a view (using the request reference), but now it is not in the template tag, it does not show the username. student_block.py (Templatetag) # template tag def student_block (request): progress = 20 user_id = request.user.id first_name = request.user.first_name last_name Try = request.user.last_name: studying_course = Student.objects.get (user__id = user_id). Course studying_year = Student.objects.get (user__id = user_id). Years excluding student No notes: studying_course = none studying_year = none if first_name and last_name: progress + = 30 if (studying_year and (study): = progress + = 50 returns {'progress': progress,' course ': studies Congress,' years ': Studying_year} register.inriage_tag (' study / student_block.html ') (student_block) student_block...

How to use maven or gradle on unreliable network? -

Meaningful use of built-in settings Sometimes the result of a hanging connection is likely to be some network problem outside of my control . I would like to know how I can set the timeline and try again to download both artifacts and publishing artifacts. I've read the timeout settings for a connection timeout and HTTP wagon, but I have not found a retry option. To publish, I found a retry option, but no timeout setting. Edit What I want is equal to curl - maximum-time, And the option to download and publish again and again Delay Maven and Gradle. Grade-built Maven is compatibility and this .m2 or .gradle archive directory is for you. To try again, all you have to do is restart your construction until all the things are done.

c++ - Reading an text file into an array of strings -

I have a text file that contains many words, all are separate from the spaces I am trying to read the file And then put it in an array, so that each word is said to be a different value, which is said from the array. I am using this code, but when I run my program, it does not show anything (as it should be.) ifstream file ("words.txt" ); If (file.is_open ()) {string wordArray [100]; For (int i = 0; i & Gt; WordArray [i]; Cout & lt; & Lt; I; } cout & lt; & Lt; "File is open."; } Nothing shows at all that I am doing this in a zero function, whatever is not currently being passed, but I do not think that doing anything with it is. The code should at least "open the file" or display any number from 1 to 100, but I do not get anything. I do not understand why this is not working, because I am including iostream, string, fstream, iomanip and sstream. If something is simple then I am unaware, please tell me. Good, your program...

excel - Dynamic ranges for pie charts: named ranges specified as data for a pie chart don't stick -

Image
My question is similar: Although this does not work for pie charts. When I specify the range through named ranges, and pressed, Excel expanded the designated category for a specific category. Here is a spreadsheet that you can try: The series I typed in: = SERIES (, 'raw data' Slices 01 [description], 'raw data'! Slice 01 [value], 1) As soon as I press, it has changed to Excel: = SERIES (, 'raw data'! $ A $ 14: $ A $ 33, 'raw data'! $ B $ 14: $ B $ 33,1) Is there another way to specify dynamic range for a pie chart? Thanks When using category names for the chart source, Can not use syntax, which shows a multi-column border with a filter on the column. You have to make two category names, one for value for another description and to plug them into the chart formula. Once you confirm the formula (or enter the category name through the "Select Data" dialog), Excel will replace the sheet name with the workbook name. ...

Cannot get custom notification to work Android 2.3.3 -

Image
I am trying to get a custom notification to work and although I have a problem with Android 4.0 and above No, I can not get it to work properly in 2.3.3 (API V10). The result I got is the following: Can not see, can not see, nor is there a progress bar? The XML used for RemoteView below is: XML version = "1.0" encoding = "utf-8" & gt & gt; /> & Lt; Android: layout_height = "wrap_content" android: layout_toRightOf = "@ id / running_notif_image" android: textAppearance = "@Android: Style / TextAppearance. StatusBar: Android: textView Android: id =" @ + id / running_notif_title "Android: layout_width =" wrap_content " EventContent "/> & Lt; Android: layout_height = "wrap_content" android: layout_toRightOf = "@ id / running_notif_image" android: layout_below = "@ id / running_notif_title" android: TextAppearance = "id = "@Android: Style / Text App...

arangodb - AQL aggregation functions syntax -

What is the syntax for parallel functions such as (sentence)? For example, do the following: let's go to json = {"age": {"age": ["20", "30", "40" ]}} and json.ages.age return age returns ["20 "In all these snippets the return on" [1542] invalid logic type was used for "In Age " 30 "," 40 "] Which has been used to call for 'SIM (")" Ango 2.0.4: // age of LR age = (json.ages.age Return age at age For) Amount Refund (age) / LR age R = (json.ages.age return age for age) return amount (for ages at the age of json.ages.age return)) //R return amount ((json.ages.age return age at age) For)) What is correct syntax? No related examples appear in the syntax page (). Most of the thing is that I can get a syntax for example: controller.get ("/ revenue /: year", function (rick, Ridge) {var query = "return Sam (bill collection fitter bill for...

html - trying to remove margin-right of my "" element -

Im has 3 columns with list item, and I do not understand that my first column (# cola1 ) Margin-right was not in other columns, I want to have margin right for all my columns, but I am not doing this. Can you see where the problem can be? My JSWald with problem: My html: & Lt; Img src = "image1.jpg" width = "700px" height = "360px" /> & Lt; Div id = "info" & gt; & Lt; H1 & gt; Information & lt; / H1> & Lt; Ul id = "col1" & gt; & Lt; Li & gt; & Lt; i class = "fa-phone" title = "phone" & gt; & Lt; / I & gt; Phone & lt; / li & gt; & Lt; Li & gt; & Lt; I class = "fa-fa-print" title = "fax" & gt; & Lt; / I & gt; Phone & lt; / li & gt; & Lt; / Ul & gt; & Lt; Ul id = "col2" & gt; & Lt; Li & gt; & Lt; i class = "fa-home" title = "address...

python - Python3.4 on Sublime Text 3 -

I followed these steps to get Python 3 on successful text3 Select the menu Tools & gt; Build & gt; Enter the new build system and the following: {"cmd": ["python3", "$ file"], "selector": "source.python", "file_regex": "file After that, it was saved in the following (mac-specific) directory: \ "(... * ...) \", line ([0-9] +) "} : ~ [/ p> Errno 2] There are no such files or directories: 'python3' You can use Python3 The absolute path to, because the excellent text does not read your ~ / .bash_profile file. Open the terminal, type which python3 , and use the full path: {"cmd": ["path / to / python3", "$ file "]," Selector ":" source.python "," file_regex ":" file \ "(... *?) \", Line ([0-9] +) "}

c++ - Best way to display 2D vectors with CImg -

What is the best way to display 2D matrix using CIMG? I am trying the following code but it is giving me a split error: float matrix [100] [100]; Int i; Int j; (I = 0; i & lt; 100; i ++) {for (j = 0; j & lt; 100; j ++) {matrix [i] [j] = 10.0 * sin (float) j / (2.0 * 3.1416); }} CIMG & lt; Float & gt; Img (100,100,1,1); Img._data = & amp; Matrix [0] [0]; Img.display ("test"); What am I doing? What you did is probably not a good idea: Destructor ~ CImg & lt; T & gt; Your CImg & lt; T & gt; By attempting to duplicate the buffer from the example, and as you have compelled its value, matrix , you will be in big trouble. I suggest using shared pictures instead, it's efficient (no extra memory copy) and is safe to use: CImg

mysql - get month,date, year php time from sql database -

1398305717 & lt; - इस तरह मेरे एसक्यूएल डाटाबेस समय कोड mysql समय पंक्ति नाम समय .php $ numMonth = तारीख ('मी', $ समय); $ sql = mysql_query ("चयन करें" वीडियो से दिनांक जहां की तारीख ('मी', `समय`) = $ nummonth DESC LIMIT 1); $ पंक्ति = mysql_fetch_assoc ($ sql); गूंज $ id = $ row ['id']; मुझे अंतिम आईडी को महीना अंक के बराबर करना है? इसलिए मैंने इसे पसंद किया .. लेकिन काम नहीं किया। इसे पीएचपी से कैसे प्राप्त करें इसलिए मुझे इस पोस्ट में मदद करें कि मैं एसक्यूएल से महीने का नंबर कैसे प्राप्त करूं .. धन्यवाद। संपादित करें: मैं इस तरह चाहता हूं .. लेकिन काम नहीं करता: ( $ sql = Mysql_query ("से चुनें SELECT * से वीडियो कहां महीना (FROM_UNIXTIME (` समय `)) = '$ nummonth DESC LIMIT 1"); आपको टाइमस्टैम्प में कनवर्ट करना होगा और फिर महीने को निकालना होगा। वर्तमान माह प्राप्त करने के लिए आपको php date फ़ंक्शंस का उपयोग करने की ज़रूरत नहीं है इसलिए आप इसे करने के लिए केवल mysql के कार्यों का उपयोग कर सकते हैं $...

c# - Unexpected character encountered while parsing value -

Currently I found some problems Using C with C # Jason.Net is the problem I always have {"Parsing value encountered an unexpected character: e path", line 0, position 0. "} So the way I I am using json.net, it is the following: I have a class that should be saved, the class looks like this: public class stats {summary Vjnik string of {get; Set; } Public string value {get; Set; }} Public class viewerstatarm {public list & lt; Stats & gt; Viewerstats {receive; Set; } Public string version {get; Set; } Public viewer format (bull chuck) {this.viewerstats = new list & lt; stats & gt; (); }} An object of this class will be filled with and will be saved with: file. Write all text (tmpfile, JsonConvert.SerializeObject (current), encoding UTF8); The savings part works fine and the file is present and is full. After that the file will be read back in this category: Try {ViewerStateformat Current = Jason Convert. Directoryal Object & lt;...

iterating over list and concatenating alphabetical sequence in Python -

I am trying to iterate on a list and trying to specify the character letter of each element within the list And if a duplicate assigns the next letter in the alphabet to get the unique letter. sequence = [0, 1, 2, 3, 1, 4, 2, 1] unique_sec = [0a, 1a, 2a, 3a, 1b, 4a, 2B, 1C] I tried to prepare a list of alphabet letters like this: alpha = list (map (CR, border) (65, 91))) Then I wanted to iterate on sequence like this: In sequence for me: unique_seq.append (i ) In the sequence if i do not have unique_seq other i I'm not sure how to know about the rest ... Thanks D, Here is a solution that will work with the sequence of infinite shapes and with infinite numbers ( Defining increment_item (item = 'A'): '' 'In view of a character sequence item, the character produces the next item in the sequence set: Type object: str: param item: Character sequence item to increase: rtype: str: return: next element in sequence ex: item = 'a', ret...

html - GitHub Organization Pages without named repository -

Image
Creating a website for a GitHub organization (using GitHub pages) without creating a repository with the same name possible? For example, for organization CompPyrol , I have created a repository named comppyrol.github.io as the organization. HTML and CSS files for the website are located in this repository. That's why the website is located on the website http://comppyrol.github.io . It works but I was hoping to use GitHub pages for an organization to create a repository for the website. I know that you can make an orphaned branch gh-pages for web files, but it seems that for a complete repository or project, not for the entire organization page. It is not possible that Geethhub is quite clear: User & amp; Organization page User & amp; Organization Pages live in a special repository dedicated to GITHeb page files. You must name the name of this store with the account name, e.g. You should use the username / username.github.io naming scheme. ...

c - Can I modify a shared library file to work fine with my executable -

मैंने पुस्तकालय फ़ाइल को abc.so कहते हैं जो कि ( ac , बीसी , cc ) फ़ाइलें। अब मैं एक्जीक्यूटेबल से कहता हूं target.out मेरा संदेह है ... क्या मैं abc.so को हटा सकता हूं और अलग से फिर से Abc.so से ( एसी , bc , cc ) और इसे मेरे पहले abc.so कोड> मौजूद था हालांकि मेरा target.out पुराना है। अब अगर मैं target.out चलाता हूं तो यह नया abc के साथ ठीक काम करेगा। इसलिए ?? हाँ यह काम करेगा, लेकिन आपको सावधान रहना होगा। चलो उदाहरण के रूप में लेते हैं: int my_global_var = 42; Int राशि (int a, int b) {वापसी a + b; } इसे इसके साथ बनाया जा सकता है: gcc -fPIC -shared-o libtest.so libtest.c readelf -s libtest.so के साथ हम देख सकते हैं कि फ़ंक्शन और वैश्विक वैरिएबल को सार्वजनिक प्रतीकों के रूप में उजागर किया गया था: $ readelf -s libtest.so 42 : 0000000000200950 4 ऑब्जेक्ट ग्लोबल डिफॉल्ट 21 my_global_var ... 47: 0000000000000665 42 एफआईएनसी वैश्विक डिफाल्ट 11 राशि ... यह ध्यान देने योग्य है कि .so फ़ाइल इन प्रतीकों के प्रकारों या प्रोटोटाइप को न...

java - Can't convert byte to normal view -

I have a long value, which I want to change the OT byte array. I use this function public static byte [] verticalobetre (long value) {byte [] result = new byte [8]; For (int i = 0; i and looks like output data 18 10010 -12 111111111111111111111111110100 88 1011000 83 1010011 0 0 0 0 0 0 0 I have too much 1 in the binary view of 12, and how can I get it? 11110100 P> This is because Integer.toBinaryString (result [i]) converts your byte to int (32 bit), and also bytes -128 to 127, so more than 127 values ​​as negative numbers Shaya being; Therefore, your byte ends with a negative int. You can change this line to solve it: System.out.println (integer.binary string (result [i]) ); For this one: System.out.println (integer. Binary string (result [i] & amp; 0xFF);

objective c - Face recognition for authentication in iOS -

I am creating an app that will use the Face Detection feature Identifies Verification or Identification I was searching on the net and found the the Luxembourg face SDK , it seems that I do not have the place to download SDK, and this is also a great SDK? Because I There is no review or forum about it. Can you recommend SDK to some good faces that support some good reviews. To help you find facial recognition, we have face A long list of detection and validation API is what you own applications. let's enjoy! 1 API provides face recognition, face detection, position of the eye, nose position, position of mouth and gender classification 2.face (detection) - face A computer vision API is the perfect face for identification and facial detection. Com replacement. We currently have a free API for face detection. 3. Animatrix Face Recognition - Animatrix Face Recognition API can be used to detect human face in pictures. Information on facial features or places is r...

jquery - How to hide div slowly in javascript -

I have two div to close div Clicking on the button. The second div increases upwards, I want to slow it down. I try to use the transition effect, but can not someone help it? Thanks in advance. Reading the document about the first argument is "duration" You can use $ ("# Notifications"). Hide ('slow');

javascript - Cannot add script node dynamically -

मैं निम्नलिखित कोड से & lt; script & gt; नोड संलग्न करने का प्रयास कर रहा हूं & lt; html & gt; & LT; बॉडी & gt; & Lt; script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" & gt; & lt; / स्क्रिप्ट & gt; & LT; स्क्रिप्ट & gt; । $ ( 'शरीर') संलग्न ( '& lt; स्क्रिप्ट & gt; चेतावनी (\' foo \ '); & lt; / स्क्रिप्ट & gt;'); & Lt; / स्क्रिप्ट & gt; & Lt; / body & gt; & Lt; / html & gt; मुझे कोड की उम्मीद है चेतावनी ('फू'); को निष्पादित करने के लिए जोड़ा जाए, लेकिन वास्तव में, निम्न स्ट्रिंग को जोड़ा गया है '); यहां क्या हो रहा है? आपको ठीक से भागना होगा स्लैश कैरेक्टर यहाँ और foo के लिए डबलक्लॉट्स का उपयोग करें: & lt; html & gt; & LT; बॉडी & gt; & Lt; script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" & gt; & lt; / स्क्रिप्ट & gt; ...

android - ratebar star in tablerow -

I have a RatingBar with 5 stars in the TableRow but It always comes out of 8 stars. But I've already used it to notify android: numStars = "5" . Also, with 4 stars instead of 4 stars, android: rating = "4" utf-8" & gt; & Lt; TableLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" Android: Layout_width = "Match_parent" Android: Layout_height = "Match_parent" android: background = "@ drawable / Drop_shaid" android: orientation = "Vertical" & gt; & Lt; TableRow android: id = "@ + id / image_row" Android: layout_width = "match_parent" Android: layout_height = "match_parent" android: gravity = "center" android: padding = "5dp" & gt; & Lt; ImageView Android: id = "@ + id / grid_image" Android: layout_width = "130dp" Android: layout_height = "130dp" /> & Lt; / TableRow ...

javascript - how to break-word in multiple select with specific width -

I want to wrap content inside multiple selections. Here's the answer: & lt; Id = "field9" multiple = "multiple" & gt; & Lt; Option value = "1523" & gt; Imaging angiogenesis part 2: Vascular targeting in cancer research & lt; / Option & gt; & Lt; Option value = "1540" & gt; Imaging guided investigation in cancer drug development & lt; / Options & gt; & Lt; Option value = "1541" & gt; Vascular tension ??? Measuring changes in the vessel wall speed & lt; / Option & gt; & Lt; / Select & gt; this & lt; Select & gt; can not be done with elements. The browser determines how to render them more options elements. Option elements take only one row in multiple selections. Instead, select the tool you can use the plugin or library, or create your own one with JS / CSS.

java - Error while using "findViewById" for mapview -

I have created a simple map application using the OSM. Everything is working fine, but there is a problem when I'm trying to use findViewById to map to the layout. I Error : java.lang.RuntimeException: Unable to start activity ComponentInfo {com.example.openstreetmaptutorial / com.example .openstreetmaptutorial.MainActivity}: java.lang.IllegalStateException: The specified child is already the mother or father. You must first call the removeView () on the child's parent Activity code : Public class main activity activity increases (double myCurrentLatitude; double Merilgutantrn: @ override protected void saved create (bundled Instansstet) {Suprknkret (saved Instensstet); receive setContentView (R.layout.activity_main); // current location GPSTracker Tracker = New GPSTracker (this); If (tracker.canGetLocation () == incorrect) {tracker.showSettingsAlert ();} Other {my CurrentLatitude = tracker.getLatitude (); MyCurrentLongitude = tracker.getLongitude ();} MapVie...

ios - Does Core Data autoupdate a many to many relationship on saving -

I have used 2 database tables and core data / NSManagedObjects in SQLite: User is user_id name group (multiple groups) Group group_id title group members (multiple users) By using core data to save a group and adding users ( Add to group) as follows: group * cordata = zero; Cordata = [NSEntityDescription insertNewObjectForEntityForName: @ Managed Object Contains in "Groups": Reference]; Request = [NSFetchRequest fetchRequestWithEntityName: @ "user"]; Request.predicate = [NSPredicate predicateWithFormat: @ "user_id =% @", user_id]; Result = [reference executeFetchRequest: request error: & amp; Error]; CoreData.group_id = group_id Cordettitle = Title [Cordata AdGroupMailersObject: [Last objections result]]; Is it right to say that core data manages a user with multiple users and groups with the code above? Yes, if the relationships are in the form of each other's inverse relationship The inverse relationships are updated automaticall...

java - How does Dropbox app access my app-cache? (Android) -

I'm trying to implement a "share image" button in my Android app. Since the image can be private to the user, I did not want to save it publicly on the device, so I chose to use the cache. Before I understood that the cache directory can only be accessed by the owner app, I found that sharing the image to Dropbox works fine (whereas other apps throw exceptions) The dropbox accesses the file that is located in my app cache? My share-bitmap method (exception handling is stripped): final file outputFile = new file (getCacheDir (), File name); // Save File FileOutputStream Out = New FileOutputStream (outputFile); Bitmap.compress (bitmap.compress format.png, 100, out); // Get the path to the file URI bmpUri = Uri.parse (outputFile.getAbsolutePath ()); // Share Image Last Intent Intention = New Intent (android.content.Intent.ACTION_SEND); Intent.setData (bmpUri); intent.putExtra (Intent.EXTRA_STREAM, bmpUri); intent.setType ("image / *"); Start creating...

javascript - Making hidden menu for mobile view -

I created site navigation for a one page style layout and I was hoping someone helped me with a mobile layout. Could Navigation The navigation looks okay in the big screen, but I want to hide all the menu items for the mobile view until you click it. I appreciate your help! This is in my fluid css #nav {background color: #fff; Clean both; Swim left; Margin-left: 0; Width: 100%; Minute-height: 40px; Display: block;} #nav ul {padding-top: 8px; Margins: Auto; Text-align: center; List-style-type: none; } #nav ul li {display: inline; Border-right: 1px solid # e6e6e6; Padding: 6px 26px 8px 26px; Margin: 0; } #NUUL Lee: First-child (border-left: 1px solid # E6A6A6;) # nav a {font-family: 'source sans pro', without-serif; font-size: 16px; color : # 515151; font-weight: 300; text-decoration: none; text-transform: uppercase;} # nav A: visited {color: # 515151;} # nav A: hover {color: # 000; / @ media only screen and (minimum-width: 481px) {} / * Desktop layout: more ...

utf 8 - File size in UTF-8 encoding? -

I have created a file with UTF-8 encoding, but I did not understand the size of the size of the disk. Here's my complete research: First I wrote a single Hindi letter '¤ ??' With the file created and the file size on Windows 7 was 8 bytes. Now with two letters' ¤ ?? ¤ ?? ' And the file size was 11 bytes. Now three letters' ¤ ?? ¤ ?? ¤ ?? ' With and the file size was 14 bytes. Can anyone explain to me why such a shape is showing? are used for the first three bytes EF BB BF . Then, encode the bytes E0 A4 95 ? Then byte 0Da encode a carriage return. Total: 8 bytes. For each letter ?? You add, you need three more bytes.

shell - Bash How to format a date -

I want to grep a file with the following date format: master24 April I currently have date + "% d% m% Y" and it is coming back 24 04, 2014. How can I get the format "Thursday 24th April" to get? So do I need day and date? will suggest date + "% a% b% d"

c# - Winforms do not allow any resizing -

I'm having trouble making Win 8 non-resizable. I have disabled it at the maximum button and this is maximizing by default, but when I double click on the top bar or change it from the top bar, dragging it. How to disable those actions? I think that is the behavior below which you are: set : FormBorder Style FixedScoding / Fixed 3D / FixedDialog Maximize box to false load of form short windowstate minimize : Private Zero form1_load (object sender, event events e) {width = s Screen initial screen. Bounds. With; Height = screen. initial screen. Bounce.height; } If you want to start at the location (0, 0), then set from StartPosition to manual , and Location to (0, 0)

Are there any predefined variables available in the template in angular dart? -

There is currently no "description" in the dart document and Google has not helped me either. Is there a predefined variables or something that is in Angulardt templates? To clarify what I mean with this: Some {{baseURL}} or something like this: The stuff that provides each template. There is a debug directive in SMART (PHP templates) which is in the current realm which shows everything, which is very good for developing and debugging more complex templates. I think there is nothing like dart? I can not find any suggestion that anyone. If there are, then the list will need to be published, because it can easily fight with its names, and cause confusion. If you have access to anything like this, I think it would be easy to understand (and debug) it later to add it directly to your object in order to understand it more !

c# - Linq query EntityCommandExeceptionException error -

When I call 'api / test / name = stop, tap, app ... (24 names values)' I am experiencing an error below, below the query below: "message": "An error occurred.", "Exception message": "Some part of your SQL statement Is very nested nested. It breaks into queries or short queries. "," Exception type ":" System.Data.SqlClient.SqlException Linq query: var data = db.database_bd.AsQueryable (); if (query.startDate! = Null) {data = data where (c => c.Uploa dDate> = query.startDate);} // If any other filter is specified, return records that match one of these: var filteredData = new list & lt; IQueryable & lt; database_bd & gt; & gt; ;;;;); If (! String.IsNullOrEmpty (query.name)) {var ids = query.name.Split (','); foreign (ids in string i) {filteredData.Add (data.Where (c = Gt; c.Name! = Null & amp; amp; amp; amp;; c; name; insertion (i));}} // If no filter has been passed, all data wi...

mysql - Pass on variable sql queries in php -

This query works when phpMyAdmin is entered, but I can not work in PHP: SET @cnt = 0; This is the code I have tried: $ mysqli = new MyScilli ($ dBhost, $ dbuser, $ dbpass, $ dbname); $ ResSrt = $ mysqli- & gt; Query ("SET @cnt = 0; UPDATE Group no command" SET command = @cnt: = (@ cnt + 1) "); Error if performing ("$ $ ResSrt") {echo "query": ("$ Mysqli-> errno.") ". $ Mysqli- & gt; Error; } Here is the error message: Error executing query: (1064) You have an error in your SQL syntax; To use the closest 'UPDATE groups, check the manual related to your MySQL server version for the correct syntax SET ordering = @cnt: = (@ cnt + 1) according to the name' line1 ' Any ideas how to fix this? Simple reason: In SET @cnt = 0; Set the command of the SET = @ cnt: = (@ cnt + 1) by name "" You can enter single $ mysqli-> The query is attempting to execute 2 queries function. ...

javascript - Ember.js How to show the dynamic segment in the view? -

मेरे मार्गों में, मेरे पास यह है: App.Router.map (फ़ंक्शन ( ) {This.resource ('posts', function () {this.route ('search', {path: 'search /: query'});});}); और मेरे खोज मार्ग में, मेरे पास यह है: App.PostsSearchRoute = Ember.Route.extend ({मॉडल: फ़ंक्शन (पैराम्स) {वापसी एम। $। GetJSON ('पद? Q =' + params.query);}}}; इसलिए जब मैं url पर जाता हूं: / posts / search / posttobesearched , params.query हो जाता है posttobesearched । अब, मेरे खोज टेम्पलेट में, मुझे पोस्ट-टॉब्सियरिंग दिखाया जाएगा मैंने इसे ऐसा किया: & lt; h2 & gt; के लिए खोज परिणाम: & lt; em & gt; {{query}} & lt; / h2 & gt; लेकिन यह क्वेरी नहीं दिखाया। कृपया मुझे बताएं कि ऐसा कैसे करें। मुझे लगता है कि आपके नियंत्रक को इसे इस पर रखना होगा: queryParams: ['query'], क्वेरी: रिक्त और फिर मुझे लगता है कि आपके {{query}} उस टेम्पलेट में कार्य करना चाहिए। [संपादित करें] इसके अलावा, ध्यान दें कि आपके पास क्वेरी पैरामीटर की सुविधा...

c# - Find the min and max for quadratic equation -

How to find the minimum and maximum for quadratic equation using C #? f (x, y) = x ^ 2 + y ^ 2 + 25 * (sin (x) ^ 2 + sin (y) ^ 2), where (x , y) from (-2p, 2p)) ?? Manually solve I've found = 0, max = 8p = 2 = 78.957. I tried to write code based on the liner class but something goes completely wrong give this code minimum = -4. ?? And maximum = 96 can you know where my fault is? I uploaded the code to Dropbox, if anyone can see: double [] X, Y, results; // Range array and result array set any range for Private Zero BtnRun_Click (Object Sender, EventArgs E) {// Function X = setRange (-2 * Math.PI, 2 * Math.PI, 10000); Y = Setrange (-2 * Math.PI, 2 * Math, PI, 10000); Results = getOutput_twoVariablesFunction (X, Y); Int max index = getMaxIndex (results); Int Min Induct = Millindex (results); TxtMin.Text = result [min indax]. Ostring (); TxtMax.Text = Result [Max Indexes] .Ostring (); } Private Double Double Variables Function (Double X, Double Y) {Double F; // An...

one to many - Sharing Data Between iOS devices -

मैं डेटा साझा करना चाहता हूं (शायद xml या json फ़ाइल) के बीच 2 आईओएस उपकरणों (आईफोन या आईपैड) और संचार एक समय में "कई द्विदिश" आधार के समान होगा। कुछ अनुभव और लेख से, मुझे यह करने के लिए नीचे तरीके मिल गए हैं वाई-फाई डायरेक्ट एयरड्रॉप ब्लूटूथ (मास्टर और स्लेव्स बनाकर) बोन्जोर एसडीके। बाम्प एपीआई (जो कि पहले से जनवरी 2014 से बंद हो चुका है) क्या कोई मेरी आवश्यकता को पूरा करने का सबसे अच्छा तरीका सुझा सकता है, जो कि यह करने का एक अच्छा तरीका है? चूंकि IOS 7 Multipeer कनेक्टिविटी भी काफी दिलचस्प हो सकता है। Multipeer कनेक्टिविटी फ्रेमवर्क बुनियादी WiFi नेटवर्क, पीअर-टू-पीयर वाई-फाई, और ब्लूटूथ व्यक्तिगत क्षेत्र नेटवर्क और subsequentl का उपयोग कर पास आईओएस उपकरणों द्वारा प्रदान की गई सेवाओं की खोज के लिए समर्थन प्रदान करता है वाई-इन सेवाओं के साथ संदेश-आधारित डेटा, स्ट्रीमिंग डेटा, और संसाधन (जैसे कि फाइल) भेजकर संचार करते हैं। मल्टीपीयर कनेक्टिविटी का उपयोग कर फ़ाइल साझाकरण सिस्टम को लागू करने के बारे में एक अच्छी ट्यूटोरियल है:

javascript - Opening a GridView Row in the same window as Parent Page while retaining my values? -

मेरे पास एक asp.net gridview के लिए यह VB.NET कोड है: संरक्षित उप GridView3_RowDataBound (इस वस्तु के रूप में, ई System.Web.UI.WebControls.GridViewRowEventArgs के रूप में) हैंडल GridView3.RowDataBound तो e.Row.RowType = DataControlRowType.DataRow फिर e.Row.Cells (1) .Attributes ( "onmouseover") = " this.style.cursor = 'हाथ'; this.style.textDecoration = 'रेखांकन'; " ई। आरओ। सील्स (1)। विशेषताएँ ("ऑन-हाउसआउट") = "this.style.textDecoration = 'none';" मंद सूचकांक के रूप में पूर्णांक = e.Row.RowIndex e.Row.Cells (1) .Attributes ( "onclick") = "window.open ( 'AreaQuery.aspx? AreaID =" + GridView3.DataKeys (e.Row.RowIndex) । वैल्यू। टॉस्ट्रिंग + "');" अंत यदि समाप्ति उप कोड की रेखा: ई। रो.केल (1)। विशेषताएँ ("OnClick") = "window.open ('AreaQuery.aspx? AreaID =' + GridView3.DataKeys (ई.रो.रॉ इंडैक्स)। Valal.ToString + "');" एक नई विंडो में न...

Irregular sampling of an image using OpenGL -

How do I want to sample an image using OpenGL in a list of specific points? Tutorials similar to the problem below or for example a link? At this time we have a code that calculates the 'output intensity' in the list of specific locations x1, y1, x2, y2, ..., xn, yn Apply a Lanzos2 filter to an input image. At present, the quantity of places is 20 (which is actually a list of phosphene locations in a visual artificial limb), but it will eventually increase to 256 and the GPU process will definitely speed things up. So far I have seen how an average filter can be applied equally, but in my case there is no need to calculate the convolution with the filter kernel on each image, specifying the pixels Just places. Sample this value (on the other side) or not.

c++ - Qt hex representation of a negative 8bit int? -

However, I am looking for a QT solution. I'm looking for a way to convert an 8-bit negative int into a hex representation by example it would be better understood. qint8 width = - 100; QDebug () & lt; & Lt; Caststring :: Number (width, 16); // "ffffffffffff9c" Output is greater than 2 bytes. However, when I change it into unsigned, it works fine. quint8 width = - 100; QDebug () & lt; & Lt; Caststring :: Number (width, 16); // "9C" The documentation says: typedef quint8 supported by Q type for unsigned char This type of 8-bit guarantee is available on all platforms. Type Type qint8 This type of 8-bit guarantee is guaranteed on all platforms supported by Q. Should not be unsigned, not able to deal with negative numbers? The problem is that QString :: number int or uint Type There are no 8-bit integers versions, so these are kept in bigger integers in the whole. It works well with signed integers becau...

Change a table cell data in mysql -

I failed to know how to change any particular cell data in a mysql database table. For example: There are 3 tables in the MyDB database "Table 1" "Table 2" "Table 3" etc. Table 3 has 3 columns: ID | Title | Timeline: Multiple rows in each column (content is prepared) "Table3" id. Title | Deadline 1 | ABC | 30 2 Def | 45 3 Too. 30 etc. Then, let me change from 30 to 60 to deadline ou line ID 3 Is , how can I do this? When I type update table 3 set deadline = '60' where 30 is the time limit Roman 3, then in that section, specify in which section update table 3 set deadline = 60 where id = 3;

java - IOUtils.toByteArray() OutOfMemoryError -

I try to process a larger video file with more than 100 MB size. Public static zero compress (file input, file output) throws IOException {InputStream fis = new FileInputStream (input); Byte [] bFile = IOUtils.toByteArray (fis); FileOutputStream fos = New FileOutputStream (Output); GZIPOutputStream gzipStream = new GZIPOutputStream (fos); Try gzipStream.write (bFile); // IOUtils.copy (fis, gzipStream); } Finally {gzipStream.close (); Fis.close (); Fos.close (); }} Every time I get an Outmemore Ripper You must copy the data slowly and you will not be out of memory. InputStream = new FileInputStream (input); OutputStream Out = New GizIIPOutputstream (new file output stream)) { Byte [] bytes = new byte [4096]; (For int lane; (lane = in. Raid (bytes));;; out. Written (bytes, 0, lane); }} This will use approximately 4 kb as a buffer, regardless of the size of the file. (I suspect that Jeezip uses it to work)

Laravel Font face in layout and other blade -

I have layout view with two fonts in a CSS and header, and there is a header output for another blade view: {{HTML :: Style ('css / style1.css')}} @Elder ('header') & lt; Style type = "text / css" & gt; @ Font-face {font-family: new-font; Src: url ('font / brandon_grotesque_medium.ttf'); } & Lt; / Style & gt; & Lt; Style type = "text / css" & gt; @ font-face {font-family: Noto-Sans; Src: url ('font / NotoSans-Bold.ttf'); } & Lt; / Style & gt; They both work fine in this layout view. But I have another scene: @extends ('layout') @section ('header') {{HTML :: style ('css / posts / style2.css')} } @ Stop @ section ('content') my content here @stop style2 css works fine in my second view, but the fonts are missing. I have tried putting a font script in the header section in my second view, but still nothing. What can be the problem? You can use an proper...

multithreading - Why my Thread run after Form creation? -

I have a project after main form my threads has been made . But this code does not work correctly: Type TMyThread = class (TThread) executed public process; Override; Process duplicates; End; { type } . . . Process TForm1.FormCreate (Sender: TObject); Var thrd: TMyThread; Start Thrd: = TMyThread.Create (True); Thrd.Resume; // The following code will tell about 5 seconds to show the time delay of `form '... end; . . . TMyThread.Execute Process; Heritage begins; DoProc; End; Process TMyThread.doProc; Warfare: TIFR; Start AForm: = TForm.Create (zero); AForm.Caption: = 'Thread form'; Forearm Position: = POSCREENCENTRE; Forum.formstyle: = fstaonoptop; AForm.Show; End; I do not want to use the synchronize . One way to exclude my threads from the main code is ? When showing main form , I want to show the form before the main form . class = "post-text" itemprop = "text"> Mohammed, I think the total [multithreading] Misunderstanding ...

java - NullPointerException on Map Object -

I use eclipse and android sdk. I want to point to a location on the map, so I use this function when the user button: public zero pinpoint-location (reference reference) {map = (SupportMapFragment) (( FragmentActivity) mContext) .getSupportFragmentManager () FindFragmentById (android.R.id.content)). (); Marker hamburg = map.addMarker (new marker option). Position (hamburg). Title ("hamburg")); Marker key = map Edmark (new marker option.) Business (KIEL) .title ("key"). Senapet ("Nail is cool"). Inon (bitmap descriptor Forum Resource (RDW.IC_Luncher)); // Zoom to 15 to move the camera immediately to Hamburg. Map.moveCamera (CameraUpdateFactory.newLatLongZoom (Hamburg, 15)); // zoom in, animate the camera Map.animateCamera (CameraUpdateFactory.zoomTo (10), 2000, tap); } But when I run the program in the emulator it is an accident and I get this error: 04-24 06: 16: 35.327: E / Android Random (4070): java.lang.NullPointerException 04-24 06: 16: 3...

c# - HTMLDecode string array using LINQ -

How can I use string [] to LINQ Can i e.g. Instead of string instead of string as Institute & amp; Apos; s from string [] is getting / P> I tried, values. ForEach (item = & gt; WebUtility.HtmlDecode (item)); Where My string [] .. Still, I'm unable to get the desired result. Edit: As shown above of my original string, institution and I encode it as I am receiving Institute & amp; Apos; S ----> First level encoding Institute & amp; Apos; s ----> Second level encoding After applying the following solutions, I am able to Institute but the actual string Institute You are not seeing any changes The reason for this is that WebUtility.HtmlDecode does not specify a value for the parameters you passed, instead, giving it the value of the HTML decoded Is there. string encoded string = "& amp; amp;"; // This is nothing but WebUtility.HtmlDecode (encoded string); // It assigns a decoded va...

remove duplicate values from different array php -

I have an issue to remove duplicate entries from three different arrays. Let me create the structure of an array The array ('table_id' = & gt; array (1 = & gt; '1', 2 = & gt; '1', 3 = & gt; 1 ', 4 = & nbsp; Gt; 1 ', 5 = & gt; 1', 6 = & gt; '1', 7 => '1', 8 = & gt; '1', & lt; - this entry is' 1 ': 14 = & gt; 1', 17 = & gt; '1', 20 = & gt; '1', & lt; - In this entry, the value is' 1 ': 21 = & gt; 1' , 25 = & Gt; 1 ', 28 = & gt; 1', & lt; - this entry has the value '1' :), 'no_of_seats' = & gt; array (1 = & gt; 2' , 2 = 2, 4 = & gt; 2 ', 4 = & gt; 2', 5 = & gt; 2 ', 6 = & gt; 4', 7 = & gt; 4 '4' is the value in this entry: 14 = & gt; 8 ', 17 = & gt; 2', 20 = & gt; 4 ' , & Lt; - This entry has the value '4...

ios - Add my Push notification in Notification area -

I have successfully received my push notification in both background and foreground but my problem occurs when my application is active state / Foreground and push notification has arrived, then I show this confirmation message on alert view using the didReiveiveRemoteNotification method, My alert view has two buttons 1) After 2) Okay. If I press 1 "later" button then I want to add this notification notification message in the information area, so after some time the user can view and tap that specific push notification and record that The push notifications will be removed from the Notification Area of ​​the notification. It is not possible that there is no API to access the notification of the IOS. Alternate You can choose what option has local notification when the user subsequently selected local notification for that thing when the user continues your app Add local notifications when users leave your app. Better Approach The most common approach t...

Timestamp discrepancies between SQL server and Java -

I have to repeat a simple process for the SQL server stored function from Java code. This product will go to a SQL Azure DB, but I'm testing it against my local SQL Express 12 installation. Part of this stored procedure is to add some value to the string. This is my example Java code: import java.sql.Timestamp; Import java.text.DateFormat; Import java.text.ParseException; Import java.text.SimpleDateFormat; Import com_mon.base.Strings; Public Static String Context () {// init variable date format with format data date format = new SimpleDateFormat ("dd / MM / yyyy HH: mm: ss.SSS"); Timestamp date = new timestamp (date format. PRSE ("04/04/2014 21: 07: 13.897"). Match-time ()); // format variables 0-free strings string formatteddet = string Format ("% 011d", date. GetTime () / 1000); // those string string final string = ... + formatted data + ...; Return final string; } Variables: | Date | Formatted_date | | ----------------------- | --...