Posts

Showing posts from August, 2011

Cropping UIimage in IOS -

I am very new to iOS and my first work is cropping the image. It means that if I were to create a banner image I am using an image and the given frame size is either the size of the small thn image. My code should automatically resize the image in the relative aspect ratio of the image and then set the picture in that frame < P> I have done R & D and after that I have written the code - (UIImage *) MyScaleNEwMethodwithImage: (UIImage *) image and frame (Sijiartiatti) frame {float Bimaciiiiii = Cvisaijh. height; Float bmWidth = image.size.width; UIImage * Received Image = Image; If (bmhite> bmwdath) {float ratio = frame. Size.height / frame.size.width; Float newbmHeight = ratio * BMWWithth; Float Cutted = (BMHite-NBMHite) / 2; If (Cropped Height & Lt; 0) {Float Ratio 1 = frame.edame.width / frame.size.height; Float newbmHeight1 = (ratio 1 * bmHite); Float cropimage height 1 = (BMW-NE-NBM HEIGHT 1) / 2; CGRTT clactct = CGRactack (CrossSpnimite Heat1, 0, BMWWith-C

php - Can mysql query have 2 inner join with 2 IN clause? -

After the I have selected 4 separate mysql table, as node_created node.created , Node. NID as well as NID, node node.title field_data_field_resume_of_study.entity_id Join field_data_field_resume_education.entity_id = node.nid Insider on field_data_field_resume_education as internal title = field_data_field_resume_education.field_resume_education_value Insider Join field_data_field_resume_degree_level field_data_field_resume_of_study looking at field_data_field_resume_degree_level.entity_id = field_data_field_resume_education. Field_resume_education_value Where in field_data_field_resume_degree_level.field_resume_degree_level_tid (4,7) and field_data_field_resume_of_study.field_resume_of_study_tid by node_created DESC Iam is trying to get value from 2 different tables like the normal return value in both IT O Nly, but it only gives an empty query I have checked that there is a normal node in both Do we have clause positions in two sections where the section please tell me

linux - Files installed from debian package with dpkg do not belong to root -

मैंने इस आदेश के साथ एक बाइनरी पैकेज बनाया: dpkg-deb --build - Z9 -Zlzma $ (DEB_SRC_DIR) $ (DEB_DEST_DIR) और इस कमांड के साथ अपने उबुंटू 12.04 पर इसे स्थापित करें: sudo dpkg -i / path / संकुल की सामग्री मुझे लगता है कि अप्रासंगिक है। सुडो कम होने के बावजूद, स्थापना निर्देशिका में फाइलें मौजूदा उपयोगकर्ता से संबंधित हैं और जड़ें नहीं हैं जैसा कि मैंने उम्मीद की थी। मैं इसे कैसे ठीक कर सकता हूं? dpkg-deb कमांड के साथ fakeroot : `fakeroot dpkg-deb ...` (यदि केवल स्रोत निर्देशिका में फाइलें पहले से ही सही स्वामित्व में हैं, तो यह केवल तभी मदद करेगा, जो शायद वे न हों। समस्या जो आप वास्तव में यहां हल करने का प्रयास कर रहे हैं, उसमें फाइलों के साथ एक संग्रह बनाने के लिए है जो उस उपयोगकर्ता के जड़ है, जहां वह है जहां फकरूट थोरिटी कैली में मदद करता है।) मुझे यह कहते हैं, कि जो भी आप कर रहे हैं वह द्विआधारी पैकेज बनाने का सबसे अच्छा तरीका नहीं है (इसके बहुत दूर)। इसके बजाय, एक dh_make के साथ डेबियन / निर्देशिका ( dh-make पैकेज से), और तदनुसार नियंत्रण फ

clojure - How do I generate a link to a function with Marginalia -

Using the documentation tool for the closure, is it possible to create a link to another function in the output? I want to do something like this: (defn foo "All tags specified in the tags and values ​​(or with a value, if the value is a string instead of the parameter collection (Tag value); content) (specify bar and "bar all tags specified with tags and prices; see foo for parameter description" [tag value]; content) < P> " bar should have a link to the documentation of foo in the doss string.

Video Compression ios : Reduce the size of a video usin AVAssetWriter -

Text after "div class =" itemprop = "text"> I succeeded in encoding a series of images captured by AVCaptureVideoPreviewLayer of AVFoundation Framework using AVAssetWriter and AVAssetWriterInput . But the size of the video is very large, so any of you can give me a tutorial suggestion or at least one of the direct me in this case or the right video output for video compression Give settings I am using the following VideoOutputSetting. Video code > VideoOutputSettings = @ {AVVideoCodecKey: AVVideoCodecH264, AVVideoWidthKey: [with NSN Number Number: width], AVVideoHeightKey: [NSNumber Number: Altitude], AVVideoCompressionPropertiesKey: @ {AVVideoAverageBitRateKey: [NSNumber numberWithInt: bitrate ] Awvidomakskefrmenterwalkey: @ (150), Awvideoprofilelevelkey: Awvideoprofilelevelh264BaselineAutoLevel, Awvideolofrmereordringke: @no, Awvideoh264EntropyModeKey: Awvideoh264EntropyModeCAVLC, Awvideoakspektedsursefrmerateke: @ (30), Awvideovergenoderoppablefr

How to loop through files in a directory using batch script -

I batch am relatively new to scripting, I have to hide through a directory that requires a script in which the 3 log files and Czech errors and warnings, I am not very clear on looping bit I wrote a little code Please help me correct it ... %% IN (% C: \ Program Files (x86) \ \ * log for <% p> * ") Finder / C:" 0 Alerts "%% Set one result 1 =% error level / Khojastrik / C: "0 Non-Filtelr" %% a result set = 2% error level% findstr / c: "0 FatalErrors" %% result set = 3% Error Level% done if% result1% & amp; % Result 2% & amp; % Result3% EQU 0 (Exit 0) Other (Exit 1) This That's what I think you should do for %% an IN ("C: \ Program Files (x86) \" & lt; installloc & gt; * * * * Log * ") are trying (to %% b) to (Alerts Nonfatattl errors FaltalErrors) (Findstr / L / C: "0 %% B" "%% ~ FA" If error Level 1 exit / B1)) exit / B < This will search for all the files in the folder fo

How do I install db2 Express-C 10.1 on OSX Mavericks -

I have tried to install DB2 Express-C10.1 on OSX Mavericks, but I get the error listed here: The steps I have taken to set up DB2 Express C on Mac OSX Mavericks All logged in user orders; When I needed to run as a different user, I used sudo. Step: Download DB2 Express C from: < Li> Open the downloaded file twice and open it. Modify the system parameter with this command: sudo Vi /etc/sysctl.conf And populate with this information: kern.sysv.shmmax = 1073741824 kern.sysv.shmmin = 1 kern. Sysv.shmmni = 4096 kern.sysv.shmseg = 32 kern.sysv.shmall = 1179648 kern.maxfilesperproc = 65536 kern.maxfiles = 65536 Reboot the computer # With very sad I added that instruction. Start the installation process with these commands: cd ~ / Downloads / expc; Accept the default path of '/opt/IBM/db2/V10.1' Run the script Wait for about three minutes. Note that a successful run has ended in 'execution successfully completed'.

database - Running multiple stored procedures in SQL Server -

I am trying to run the following code go to USE [cp_mydatabse] Process [DBO] Start as [SP_myProcedure] if selected from Master Assis Database, name WHERE name = 'tempDB') EXEC SP_UpdatetempDB - Copy data from second data base END ELSE BEGIN Print 'database does not exist' EXEC SP_CreatetempDB - create My Database SP EXEC SP_CreatetempDBTables - Create the table SP EXEC SP_UpdateTEmpDBData - Copy the data from another database END If my tempDB is present, then I found that the code is running < Code as> EXEC SP_CreatetempDB as well. What is the reason for that ? But I can not see print 'database does not exist' Output on my console Do you have any information about it? Thanks in advance. Try it: Alternate Processes [DBO]. [SP_myProcedure] as if existing (master.sys.databases by selector name where name = 'tempDB') BEGIN EXEC SP_UpdatetempDB - Copy data from other data base END ELSE BEGIN print 'database does not exis

software distribution - What is the proper way to access data files from projects distribuited with python wheel? -

I am not working on a pure Python project (i.e., no DLL, SOS etc etc) but some of my projects include HTML files are not those documentation, but actual data which is usually used by my software (read only). The following line is in my setup.py: data_files = [('Html', ['share / myproj / html / index.html', 'share / Myproj / html / template.html '])], When I run Python3 setup.py bdist_wheel the zip file is created properly and the data files It has been included there. After installation, these files end in / usr / local / share / myproj / html . But what is the right way to reach them with my code? Hardcoding / usr / local / is a good idea. I was looking at pkg_resource but it seems that any idea of ​​working with eggs only? If the file should be accessible to your package, then instead of package data data files For instructions on how to do this, in a nutshell, the files are included to put them in your package directory instead of a sepa

c - expected '=', ',', ';', 'asm' or '__attribute__' before func -

I have the following function with me and when I compile my whole file, I give a certain error: Function: Static Boolean 2388 e1000_phys_port (pic_t * pic, e1000_t * e1000) 2389 {2390 pic-> pic_flags = 0; 2391 2392 switch (pick-> pic_id) {2393 case I2C_ID_VSERIES_GIGE_PIC: 2394 e1000-> e1000_port_count = fwdd_vjx_get_e1000_ports (); 23 9 5 break; 2396 Default: 23 9 7 syslog (LOG_ERR, "% s: unknown I2C ID \ n", e1000- & gt; pic_name); 2398 returns (FALSE); 2399} 2400 2401 return (TRUE); 2402} Error: 2388: error: expected '=', ',', ';', 'asm' or '__attribute__' before If someone for me this asap! can solve I1000_phys_port boolean (when Until you call it typedef 'adi somewhere in it) - Russell Zahnisar What @RusselJahnaser means that any name in C booolan Not defined, as long as the typedef (or #define ) was defined using, for example typedef int booolan; . - caspase You will see #includ

python - pandas date_range, end karg -

Long time readers, first question, new for pandas, hope the question is understandable! I have a dataframe DF that is: in [151]: df.index out [151]: & lt; Class 'pandas.tseries.index.DatetimeIndex' & gt; [2013-08-04, ..., 2040-08-04] Length: 37, Freak: None, Timezone: Anyone I need a new data frame containing all values DF is already, and for all the quarterly dates, the NAN, which initiates the quarter after the first date in DF, and terminates the quarter after the last date in the DF. My plan is: < In [163]: dfm = pd.DataFrame (index = pd.date_range (start = df.index [0], end = df.index [len (df) -1], freq = 'q')) In [164]: Dfs = pd.concat ([df, dfm]). [165]: dfs.tail () Out [165]: NPV 2040-03-31 Nain 2040-06-30 Nain 2040-07- 30 31977750.393512 2040-08-04 30000000.000000 2040-08-04 30000000.000000 [ 5 rows x 1 column] The issue is that the last quarter is 2040-06-30 and not 2040-09 -30. Then sets the queue before last keyword df.

python - Set superpixel color -

Assuming that you have the result of superpixing algorithms such as SLIC Segment_celic = Slick (image, n_segs = 250, compactness = 10, sigma = 1) How to display the image as a color separately with a preset color for each prepex (Say, you already know imshow (mark_boundaries (img, segments_slic)) ex> < P> but only to borders Instead of being marked, I need sense segmentation from those labels with whom I work If you know which value you want to specify in a particular state, then copy the label (i, j) new_labels = labels.copy () Then proceed to the label "Rename": new_labels [label == label [i, j]] = new_label_value

javascript - Websocket Handshake Immediately closes only in IE 10 -

I have a general website that is a login form using webcockets. Although it works fine with Firefox and Chrome, no connection is established and thus no login using either IE 10 or 11 I used Feedler and found that the result of successful connection is 101 (which is in Chrome and Firefox), while in IE this is 200. In addition, the following message: SCRIPT12008: WebSocket Error: Incorrect HTTP response status code 200, OK appears in IE console. Any ideas about what is wrong? It's been a while, but anyway I think it can help someone else I have participated in the problem WebSocket Servlet definition in web.xml was wrong You must also add the servlet that has been said in the struts. Xml can exclude the pattern.

java - Configure Datasource userid/password/instance/port outside of CamelContext? -

हमारे संदर्भ से एक स्निपेट है: & lt; bean id = "dataSource" Class = "com.jolbox.bonecp.BoneCPDataSource" नष्ट-विधि = "बंद" & gt; & Lt; संपत्ति नाम = "ड्राइवर क्लास" मान = "oracle.jdbc.OracleDriver" / & gt; & Lt; प्रॉपर्टी नाम = "jdbcUrl" value = "jdbc: oracle: thin: @localhost: 1521: ORA11G" / & gt; & Lt; संपत्ति नाम = "उपयोगकर्ता नाम" मान = "उपयोगकर्ता" / & gt; & Lt; संपत्ति नाम = "पासवर्ड" मान = "पासवर्ड" / & gt; & Lt; प्रॉपर्टी नाम = "मैक्सकनेक्शनपर पार्टिशन" मान = "30" / & gt; & Lt; प्रॉपर्टी नाम = "मिनिकनेक्शनपर पार्टिशन" मान = "10" / & gt; & Lt; प्रॉपर्टी नाम = "विभाजनकॉउंट" मान = "3" / & gt; & Lt; संपत्ति नाम = "अधिग्रहण" मूल्य = "5" / & gt; & Lt; संपत्ति नाम = "statementsCacheSize" मान = "100&qu

c# - MySQL Parameterized Select Query joining tables issue -

I am using parameterized select questions in conjunction with my program and it works entirely, When I try to join the table Everything I have done is a small fraction: using (MySqlCommand cmd = new MySqlCommand (paramQuery) ToSql (), Connection)) /etc/ paramQuery.ToSql () Equal: "Select TableOne ID, Tableon, Department, Tablet. One by name table, Table 2 h Yes TableOnEID = @Pharmak "* / for (Int Index = 0; Index and Lt; ParamariX Parameter (.c calculation; Index ++) Cmd.Parameters.AddWithValue (paramQuery.Parameters (). ElementAt (index). , ParamQuery.Parameters (). ElementAt (index) .Value); / * ParamQuery.Parameters (). ElementAt (index) .k = "@most 0" paramQuery.Parameters (). ElementAt (index) .Value = "tableTwo.ID" * / MySqlDataReader Reader = cmd.ExecuteReader (); While (reader.Read ()) {// do stuff} } One of the tables I attempt to join is For the table, two with the same id for all. Is there something that I'm doing wrong?

How to set colnames and rownames when you read bunch of files from a directory into R? -

I have a lot of files in it. I can read all the files and select the second column of each file and I am trying to use Rbiind to make the matrix. But the problem is that after creating the matrix it has no alias and row name, in fact the row name should be the filename I read and rbind is the second column. Columns should be the first column of any of the file. Here's my attempt: nm < - list.files (path = "path / to / file") Matrix & lt; -do.call (rbind, lapply (nm, function (x) read.table (file = x) [, 2])) Simulated data setup (such as all your files in the testdir directory) my.data & lt; - Indometh write.csv (my.data, file = "testdir / test1.csv", line.name = FALSE) my.data $ time & lt; - my.data $ time + 1 write.csv (my.data), File = "testdir / test2.csv", row.names = FALSE) my.data $ time & lt; - my.data $ time + 1 write.csv (my.data, file = "testdir / test3.csv", Then some changes are requi

jquery - Drawing Curved (Responsive) SVG Path on Scroll -

After reading all the discussions around the animation of SVG with the stroke dasharayi trick, I finally got to add a bit The functionality for the user's scroll position on the code got blog. This idea is very good, but I have a wavy, curvy path which is actually a hole in one point. Therefore, I had divided the total length of the calculation of the path to get a good mid ground, but it still decreases with the rear line or moves forward. Here is an example snippet with some adjustments: $ (document) .ready (function () {$ (window) .scroll (function () { Drawline ($ ('$ route'), document.getElementById ('path'));}); // Line Function drawline (container, line) Attract {var pathlandline = line.get total number (), distanceformtop = Container.offet (). Top-$ (window) .scrollTop (), percentdown = 1 - (DistanceFromTop / $ (window) .it ()), length = percent don * path lang / 30; line.style.stroke Dasharere = [length, path lamp] .join ('');}}); How

Google Places API Mis-tracking my Query Count -

After running 1k query, I have a query on Google's Places API console 5.53. is required ('open_uri) gr = build_query_list (1000) # List of URLs for Google Places requests gr.length = & gt; 100 gr.each {| R | Open (r) .read} After running the above, shows 5.53k more queries than starting with the console. This is a problem with open (str). Readings instead of APIs I started using ruby ​​gem and my problems went away.

Trying to set the time since midnight Sunday for java calendar object -

I have time in milliseconds and I'm setting it on a calendar object for a specific time. This initial time is only considered to be time estimate, but the actual time is based on the time of week in millisecond from Sunday midnight to Sunday. So somehow I need to set the time of the week calendar object but I find it hard to find out how to do this Is that a shameless way of doing this? ? Am I using the best Java object? I have not java in a long time, so this is very new to me. Here's an example: There are 2 things that happen. 1) GM time in MS for inadequate time. 01/03/2001 01:00:00 Tuesday. Then I get the event 2) GMT time in milliseconds from Sunday to midnight (01/01/2001)) 0:00:00. Let's just say that 20000 ms has become from that date. So now I have to know how to set the actual date / time since midnight, so I can see what is the real time Try it out: calendar nowadays = (although you get as the calendar, the time you take it / set it up) now long

c# - File Copy to network share fails when user does not have Write permissions to application folder -

I have a simple C # application that allows users to copy files from a template folder to a SFTP server on the network Is used for. This application shares the network and the user accesses it through the mapped drive on their desktop. Our problem is that if a user does not allow the application folder then the copy fails with the exception "unknown user name or bad password". So, here's the scenario: Security Group A : Read; Execute the List Folder Content Security Group B : Modify & amp; Write Exclusive List Folder Content \\ network.com \ public \ sftp_test - Group A and B : - Network for Networks Controlled Apps From Mapped Drives Share the share The code where the exception occurs: {network credentials creds = new network credentials ([serverusername], [ Password]); Credential Cash Cache = New Credential Cash (); Cash Add (New Uri (@ "\ \ [IP Address]"), "Basic", credits); Var sftpFile = string.format (@ "\\ [ip

Laravel Form Class Submit Value as Part of Array -

When using the form helper class with Laravel / Blade, then $ name is a way of formatting the value When the data has been retrieved, is it organized as an array? For example, in the view file, I want to do something like this: {{form :: input ('params .atename')}} {{form :: input ('params.siteurl')}} and then in the controller, when I call: $ data = input :: Mill ('Params'); $ Data return: array ('params' = & gt; array (' sitename '= & gt; user data input', 'cyclical' = & gt; more data from user Input);) good ol 'Php way: {{form :: input ('params [sitename]'}}} {{form :: input ('params [siteurl]')}}} input :: find ('param'); // array // 'sitename' = & gt; 'value-1', // 'second' = & gt; 'value-2' //)

Stop Rails from storing sessions during service calls -

Rail 2.3.18 Our main administrative site and our web services are in the same rail project . We've found that the session is being created by both administration web traffic and service calls. Is there any way to stop session storage only for web service calls? They are not necessary and this is just a waste of space. Thank you session to disable session for some tasks and controllers Can use closed plugin Install it as a gem gem 'session_off' or as a plugin install script / plugin git: // github. Com / kares / session_off.git You can disable session for all tasks by calling session: closed in the respective controller: class WebServiceController & lt; ApplicationController session: Off End

jquery - Posting with JavaScript to Restful Java Services does not work as JSON? -

Altough I'm sure this should definitely not be the first thing, I did not find the same topic with my special Are the issue I am trying to post data for my rental service in Java: @ POST @ path ("{projectId} / rename") @ Product (MediaType.APILICATION_JSON) public response Rename Project (@PathParam ("Project ID") Last Long Project ID, String Name) {Logger.getLogger (ProjectService.class.getName ()). Info ("Rename Project Service" + name); Return Request Handler Handlerennam Project (Project Ed, Name); } I am using this JS function to do this. Rename the function name project (project id, name) {$ .post} (Change the name of the project / $ ("a [data-pk = '" + + "/ rest / projects /' + Project ID + '/ rename', {name: name}, function (data) {/ sidebar .key.id + "']") .text (name);},' json '); } Now I wonder the output of log [INFO] April 28, 2014 6:56:05 pm de.uniluebeck.collaboratex.

ios - Quick switching of data in plist -

I'm working on the client-server iOS app and I save the server URL in the app property folder. I often have to switch from running the server on my local machine and staging server. How can I quickly switch data to aplist file or even list myself in the XCD project? The URL differently to determine which one to use, some launch status or Use a setting in some of your build situations

ios - Retrieving / updating individual MPNowPlayingInfoCenter properties -

In an original audio AVPlayer example, we're playing back an HLS stream and now do the settings The information is being played successfully (), but the properties of MPNowPlayingInfoCenter can not be accessed. category and active our AvAudioSession status and without any problem. NSMutableDictionary * Properties = [[NSMUTABADADO] allocation]; [Properties set object: Title for that: MPMDITPropertyTitial]; // Set many other properties MPNowPlayingInfoCenter * center = [MPNowPlayingInfoCenter defaultCenter]; [Center setnonwinginfo: property]; // Works! Lock screen successfully shows title and other properties NSLog ("% @", [center now PlaylayInfo]); NSLog shows a very Default View dictionary contains only MPNowPlayingInfoPropertyPlaybackRate to 0 - which is the way Not even right because the audio is playing back during the log. We want to make some updates, and reset them (for things like album all updates, play / pause timings, etc.). What ar

php - Getting string instead of xml response in curl -

मैं निम्नलिखित कर्ल अनुरोध $ url = 'http: // परीक्षा / ? paynetz / एपि / fts लॉगिन = 160 & amp; पारित = टेस्ट @ 123 & amp; राशि = 50 & amp;; txncurr = INR & amp; txnscamt = 0 & amp; clientcode = TkFWSU4% 3d & amp; ttype = NBFundTransfer & amp; prodid = एनएसई & amp। txnid = 'urlencode ($ स्ट्रिंग ।।) 'में & amp; तिथि =' urlencode ($ तारीख) '& amp; custacc = 1234567890 & amp; udf1 = अजीएश & amp; udf2=sam@zz.com& udf3 = 940,000,000 & amp; udf4 = arrackaparmabilhouse & amp; आरयू = http:। // www। zwitch.co '; $ Curl = curl_init (); Curl_setopt ($ कर्ल, CURLOPT_URL, $ url); Curl_setopt ($ कर्ल, CURLOPT_HEADER, 0); Curl_setopt ($ कर्ल, CURLOPT_FOLLOWLOCATION, सत्य); Curl_setopt ($ कर्ल, CURLOPT_RETURNTRANSFER, गलत); प्रतिध्वनि $ auth = curl_exec ($ कर्ल); इम हो रही इस http: // test / paynetz / एपि / ftsNBFundTransfer267050dHwIMJR% 2FucGOZcnocTnwvISAVaeNZK93Y8veI% 2Bb1DtY% 3D11 < p> xml.Im

asp.net - MVC error in javascript code -

I want to delete employee records using the post method. I changed the HTML. With theNumberlink button I want to prompt the user shortly for confirmation before deleting the record. I have written the following code: & lt; Input value = "delete" type = "submit" onclick = "return confirm ('Are you sure to delete the id = @ item.EmpId');" /> This row is showing error " unterminated string constant ", what is wrong with this code? My complete view code & lt; Table range = "1" & gt; & Lt; TR & gt; & Lt; Th & gt; @ Html.DisplayNameFor (model = & gt; model.Name) & lt; / Th & gt; & Lt; Th & gt; @ Html.DisplayNameFor (model => model. Gender) & lt; / Th & gt; & Lt; Th & gt; @ Html.DisplayNameFor (model => model.City) & lt; / Th & gt; & Lt; Th & gt; @ Html.DisplayNameFor (model = & gt; model.DID) & lt; / Th & gt; & Lt;

Facebook Feed, post two pictures in wall. Javascript SDK -

Image
Hello IM is trying to post two photos on my wall with javascript sdk. I have to do something like this: me I know how to post on my wall: "FB thanks You can simply loop through photos and post them. I think Facebook will automatically add them together, If they are the same album. for (var i = 0; i height = i ++) {.... params ['picture'] = picture 1 ; .... F.B.A. Iai (. ..);}

jquery - Getting and Setting CSS() not working...Toggle Height -

I'm basically trying to toggle height from 50px to 200px. I have written this code to check whether the height is 50px, if it is set to 200, then some other value of it sets it to 50. Basically a toggle facton $ ('Click this row (function () {console.log ("+" ($ "' .- -This '). CSS (' Css ('height', '50')) {$ ('this line'). CSS ('height', '200')} and ('' height '')); CSS ('height' '50')}); I have this in the beginning of CSS. This line {height: 50px}. Examines the height and sets to 200, but the opposite logic is not working on the next click You are using setter in your position, so you are always making the height 50px before testing. Try it: if ($ (' Css ('height', '200'), and $ ('.in-row'). ). CSS ('height', '50')}); You can minimize it using a threesome: $ row $ $ ('. -This-row'); $ Row.css ('heig

sql - How to calculate amount based on the number of working days from the month -

I have the following question that displays the table with date (month) and an amount: SELECT TOP 1000 [date], [zodiac] from [database]. [Dbo]. [Table] which displays the following: Date amount 201304 1750359,95 201305 1853203,29 201306 1741522,66 201307 1655812,14 I have the following query that gives how much workings (business) days are doing in this month: announcement @theDate DATETIME set @theDate = GETDATE ( ) DATA UNION SELECTED DATEADD (MONTH, DateDiff (MONTH, 0, @ the date), 2, as selected from 20 + COUNT (*) (Selection dateADD (MONTH, DateDiff (MONTH, 0, @theDate), 28) 9) Union selection DATEADD (month, DATEDIFF (month, 0, date, 30)) AS DTE date date (day, date) & gt; 28 and DATEDIFF (day, 0, date)% 7 <5> To display your table as the following, I would like to query my first query and another query How to add): Date amount Average 201304 1750359,95 1750359,95 / 22 = 79561,81 201305 1853203,29 1853203,29/23 = 80574,05 201306 1741522 , 66 ...

Render conditional with long in JSF -

I have a very simple column that needs red color if the value is below 15. sung = "# {resultClub.noSeries lt 15}" But the information is a long / long, always with 0 or zero Comparison is done. Is there a way to solve this problem? & lt; P: column id = "hcp80200" sortBy = "# {resclub.hcp80200}" & gt; & Lt; F: Aspect Name = "Header" & gt; HCP 80% - 200 & lt; / F: Aspect & gt; & Lt; H: output text render = "# {resultclub.noSeries gt 14}" value = "# {resClub.hcp80200}" /> & Lt; H: output text presentation = "# {resultclub.noSeries lt 15}" value = "# {resClub.hcp80200}" style = "background color: red;" /> & Lt; / P: column & gt; rated is used regardless of a component displayed Whether to do it or not. To style your JSF component conditionally, you must use CSS classes. Let's say that if you want the style outputText component, t

c# - Bad Regex performance while searching for times (xx:xx:xx) -

I have to work through a large file (many MBs) and remove the comments from that time Is marked by. An example: blablabla 12:10:40 I want to remove this blabblabla some more bla after filtering, let me Look like this: blablabla blablabla something more bla The best way to do this is to be a Regex easier: Dataout = Regex.Replace ("[012] [0123456789]: [012345] [0123456789]: [012345] [0123456789]. *", String., Blank, regedx option, compact); Now it works perfectly for my purposes, but it is a bit slow. I am assuming this because the first two letters [012] and [0123456789] Accounts are data (this is the ASCII file containing hexadecimal data, such as "0045ab0123" etc.). So the Rexx is making a match on the first two letters. When I change Regex to Dataout = Regex. (Change, ": [012345] [0123456789]: [012345] [0123456789]. *", String, Empty, Regex Option. Compact); This may be a very fast speed, probably because all the files '

Laravel 4 won't show default error messages -

I'm new to Laravel and I'm using it. It says that there are some default validation error messages, for example: The user name field is required. Email field is required. The password field is required. This message will not appear for some reasons, instead it is shown: validation.email validation.min .string Verify Confirm Why do not the default error message appear ?? (I know that I can do some custom) This is my controller: public function sign_up () {// Get all requested data $ User = New user; $ Data = input :: all (); $ Validator = $ user- & gt; Hyacer Valid ($ data); If ($ valid-> pass ()) {$ user- & gt; Email = $ data ['email']; $ User- & gt; Password = $ data ['password']; $ User- & gt; Save (); Echo ('Data was saved.'); } Else {// Verification error message collect object. Redirect Return: From ('/ sign-up') - & gt; With input () - & gt; With partners ($ accredited); }} This met

C-style loops vs Perl loops (in Perl) -

I think there is something that I do not get about Pearl's looping system. It was my understanding that for <$ p> my $ j (0 .. $ # arr) {...} Functionally equivalent to: for (my $ i = 0; $ i & lt; = $ # arr; $ i ++) {..} However, my code seems to have some minor differences in their work. Specifically, the time in which they decide when to end. For example: Suppose @arr has started with a variable in it. Should both these blocks fix the same thing? For my $ i (0 .. $ # arr) {if (some conditions that come true) {push (@arr, $ value); }} For and (my $ i = 0; $ i & lt; = $ # arr; $ i ++) {if (Some conditions may be true) {push (@arr, $ value); }} Although in execution, although a new value is pushed into both positions, the first loop will be closed only after one recurrence. Should this happen? If so, why? Edit: Thank you for all your replies, I know that I can fulfill the same thing with other looping mechanisms. When I asked if t

mysql - Django - how to dedicate certein app to database -

I have read the Django docs, but I'm afraid that I can not understand what I actually wrote, and that They are trying to explain. I want to know that I can dedicate an app to a database, another app to 2 database, etc. I get the part where I am putting a new database in settings.py, but the hard part for me is when I have to connect to the application. Example: Example: I want to add some text to DB before 1 AB, then I want to add the second DB to another DB, and all this in real time, You can do it with routes, here you have the property in Django T is the database: And here is the main about how to do this: Basically defines the router for each app that you get the name of the model you are working on With can

Liferay import pages - NoSouchGroupException -

I am trying to import the Lar file - site pages and it fails due to NoSouchGroupException: Unexpected error occurred with the publication process an unexpected error. Please check your portal and publication configuration. Com.liferay.portal.NoSuchGroupException: A group is present with primary key 19107 I am importing into an empty site. Any advice would be appreciated, thanks a lot! OK, I have found this problem, maybe it would be useful to anyone: There was a problem (why do not I think that ...) in the calendar content - although I have never set or used it when I uncheck the calendar (in choosing content section), the import succeeded Was

python - Replace all the occurrences of consecutive repeated pair of values -

I have a string with repeated repeated comos, and I want to insert a character between coma, for example What is this when I run re.sub for: re.sub (r ",,", ", 0,", "a ,,,,, ,,,,,, a ", '' a, 0, 0, 0, 0, 0, 0 ,, 0, a '' / Pre> and the result I want is all the replacement, such as: 'a, 0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0, a ' I understand why this is happening, pai Overlapping in the turn, but I do not know how to fix it. You can use a letterhead, for example: & gt; & Gt; & Gt; Re.sub (r ", (? =,)", ", 0", "a ,,,,,,,,,,,, a") 'A, 0,0,0,0,0,0, 0,0, 0,0,0,0,0,0,0,0,0, a ' or alternatively without regular expressions: & Gt; & Gt; & Gt; "," ".," A,., (",") "., ', 0,0,0,0, in x for X or" 0 "0,0,0,0,0,0,0, 0,0,0, a '

how to list all project with clearcase ucm commands -

I want to list all the ucm projects explicitly: $ & Gt; Cleartool lsproject * cleartool: Error: Unable to set VOB for pathname. Cleartool: Error: Unable to determine VOB for path name "." Cleartool: Error: Unable to determine VOB for path name "." Cleartool: Error: Unable to determine VOB for path name "." Cleartool: Error: Unable to determine VOB for path name "." $ & Gt; Cleanton lisguit cleartool: Error: Unable to determine VOB for path name. What am I doing? You must specify which project refers to all UCM objects including projects: < Pre> cleartool lsproject -invob \ yourPVob # or lsproject -invob / vobs / yourPVob on Unix Cleiston If you want only the name, then you get the benefit of some of these options You can pick: cleartool lsproject -s -invob \ yourPVob Ensure that you have a 7.1.x recent version of ClearCase: this report Does that cleartext The widget does not work well in the command 7.0.1

mysql - Regexp for a string -

I want a regular expression to match all the stars like 't' or 't-th', but only 'Th' My current Rijaxpi is: REGEXP = '[T-TH]' But this is all the stars Matches 't', 't-th' and 'g' which 'c' is not desirable REGEXP = '(T-Th | T [^ h])' We either match T-THU literally, or match T is nothing but a h except that In all words: T , t-th , but not th .

java - Specific instance of a vector of objects into a array of strings -

I'm trying to convert an array of strings to a specific example of your object vector. The object vector includes ints, doubles and strings, but I want to get only one string example of vector so that it can be converted into an array and I am running into issues. This is one of the ones I have tried. string [] tempNameA = new string [dogParkProgramMain.infoVector.size ()]; For (int x1 = 0; x1 & lt; dogParkProgramMain.infoVector.size (); x1 ++) {tempNameA [x1] = dogParkProgramMain.infoVector.elementAt (x1) .getFName (). Get (x1) .toString (); }

javascript - Add text to input field using text hyperlink -

This may be a dummy question but I can not find a solution for this. We have a piece of code: & lt; Script type = "text / javascript" & gt; $ (Function () {$ ('. Tag_selected'). (Function () {var value = $ (this) .text (); var input = $ ('# text_tag_input'); input.val ( Input Val () + value + ','); Returned;});}); & Lt; / Script & gt; and HTML: & lt; Input id = "text_tag_input" type = "text" name = "tag" /> & Lt; Div class = "tags_select" & gt; & Lt; A href = "#" & gt; Text1 & lt; / A & gt; & Lt; A href = "#" & gt; Text2 & lt; / A & gt; & Lt; A href = "#" & gt; Text3 & lt; / A & gt; & Lt; / Div & gt; The problem is following - when I click on link text 1, and then text2 etc. Everything appears in the input, what I want to achieve is to display only one variable (in this case, in t

Unable to find file or directory Python subprocess -

I am trying to call a Python module but the following error "test.sh not found" < P> but this file is found in the directory. process = subprocess. Popin ("test.sh", shell = true) The script and sh file are located in the same directory. By default the current directory is not in the pat only "test.sh" Not Found, Minimum Change "./ test.sh" . is to use. , Make sure you have legitimate Shebang, #! / Bin / sh and the executable permissions for the file ( chmod u + x test.sh ). If you are running a Python script from a different directory, you also need to provide a full path: #! / Usr / bin / env python import os import import subprances from the import check_roll script_dir = os.path.realpath (os.path.dirname (sys.argv [0])) check_call (Os.path.join (script_dir, "test. Sh ")) Note: there is no shell = True which starts the extra unnecessary shell process here realpath resolution To solve, you us

c++ - Overloading by private method with converted parameter -

With the following code, I'm getting: error: 'zero b :: add' Is . I'm surprised, but it's also frustrating to get ... I know that the add (int) method is private, but why the compiler can not find other solutions, i.e. one < Code> A object, like constructor is A (int) ? Is this behavior defined by the C ++ standard? Should the solution to this problem, or should I change the name of my personal method / apply the Peoples Idiom? Thank you. struct A {A (int) {}}; Struct B {Add Zero (const A & amp;) {} Private: Zero plus (int) {}}; Int main () {B b; B.add (5); Return 0; } Because zero plus (int) is the best Mail to b.add (5) You can get the problem using b.add (A (5)); .

sql server - SQL iteration without creating a table? -

I want to run a running SQL query as a way of finding records within a database. The name of the table is long and upset, but I will try to bring it down for a minimum example. I'm searching for a table of cars for cars with some features. Normally, it would be very easy: < Choose from cars> pre-<<> cars> color = 'red' and internal = 'cloth' However, users do not choose 'no preference' option, in that case I Do not want to filter by attribute. Let me meet with conditional subqueries around this, where @color is defined by the user input: Choose from vin cars where (select when @color = 'No Preference' then ID when Color = @ Color THEN id) and ID (Selection case when @Interreure = 'no preference' then id = INTERIOR = @ INDIER THEN ID) It works because it selects the group of all records when nothing is 'no preference' (which is the same as i and all Some get together, he will ensure that I do not los

vbscript - In VB Script get a number after a word and put into a cell on xls file -

Can anybody help me and tell me that I can write anything in VBSScript to write something After a word came into a text file and put it in the cell of an XLS file? The name of the TST file is state txt and the content is: PowerState = 13 I Thank you in advance. Thanks in advance. I just left the data - Import external data - Import data to break it For said = and leave column 1. Then put it in 13 B1. It can be refreshed at any time.

Android : Displaying names of files in asset Folder of app in listview -

I tried to display a list of files in the Asset folder but it is not showing and I found the adapter on debugging And has launched a non-empty activity so why not know why and if any mistake I have made, then why is it unable to find it? I'm new in this field, will appreciate any information public class JobListActivity activity expansion (private ListView m_JobListView; private String [] m_Filename; private String m_Path; private Arre List & lt ; string & gt; m_JobList; private Arre adapter & lt; string & gt; adapter; @ override protected void saved create (bundled Instansstet) {Suprknkret (saved Instensstet); M_JobListView = (list view) searching for ViewById ( R.id.joblistView1) ; M_Path = "file: /// android_asset /";} @ Override protected Resumes zero () {super.onResume (); M_JobList = new Arrelist & lt; String & gt; (); M_JobListView = (list view) searching for ViewById (R.id.joblistView1); adapter = new Arreadptr & lt; string &

Javascript Splitting A Astring -

मैं निम्नलिखित आउटपुट में कैसे विभाजित हूं: वांछित आउटपुट: < मजबूत> यह है मेरा सुंदर देश कहने का मतलब है, हर बार एक जगह का सामना करना पड़ता है, यह विभाजन करना होगा। हालांकि, मेरी खोज के माध्यम से ... मैं सबसे अधिक विभाजन को समाप्त करना चाहता हूं जो कि अल्पविराम के साथ समाप्त हुआ जैसे- & lt; - यह, मेरा, प्यारा, देश-> जैसा कि मैं उत्पादन से ऊपर प्राप्त करना चाहता था जहां एक स्थान का सामना करना पड़ता है , यह अल्पविराम के बिना नई लाइन में बांट दिया जाएगा मेरा वर्तमान कोड फ़ंक्शन विभाजन (a) {var x; X = a.split (""); document.write (x); } Var A; ए = window.prompt ("स्ट्रिंग प्रविष्ट करें:", ""); विभाजन (ए); सरणी के रूप में विभाजित () परिणाम का इलाज: फ़ंक्शन विभाजन (ए) {var x; X = a.split (""); //document.getElementById ("Retsult").innerHTML = x; के लिए (i = 0; i & lt; x.length; i ++) {document.write (x [i] + '& lt; br & gt;'); }} Var A; ए = window.prompt ("स्ट्रिंग प्रवि

Using telnet connection, sending commands and receiving data using putty, plink or hyperterminal -

I need to create a batch file and script that will issue two commands to a resident and log the requested data into a file . I have a profile of connection made in Putini and can create a batch file which will open the session and will join both the clerical and putty. From there, I can manually paste the command into Lipx and get the data. The command looks like this: "# 12345678D @ 5,19 [ETX]" basically requests the last 5 sets of unmarked data, the next order is also easy ... "# 12345678 OK, 56 [ETX] "Accepts data and is sent as a dancer. One complexity is that if the connection takes about 5 to 10 seconds, then install it so that there is a waiting or sleep before the first command. Finally this batch file and script needs to be run once in an hour. I am relatively inexperienced with codes and languages, and appreciate any help or direction. Neither the putty nor the pipe or the hyperterminal option is the tool: net cat (Or nc ), which is speci

rpm-maven-plugin 2.1-alpha-3 does not execute scriptlets -

I have a postInstall scriptlet in the script. But it is not being executed I Found that works well as XML formatting, with only small, single commands, add extra line breaks that That do not work well with shell scripts. I recommend that you move your script code to a different file and instead instead. When you have a different If the file has a script, then it is easy to test this script outside the ALS O package. Best regards, Alexander.

javascript - validate numeric with 1 special character -

I want to validate numerical and allow + (plus sign), but it is not working < / P> Do I want +63443 -> Ok 8452 - & gt; Ok s55sd - & gt; It is my code var nom = $ ("# addKonId1"). Val (). Split ("") .join ("") .replace (/ ^ \ s \ s * /, '') Replace (/ \ s \s * $ /, ''); Var intergroup = / ^ \ D + $ /; If (IntRegex.test (dot)) {Warning ("wrong number"); } And {warning (noam); } Regular expression of what you are looking for: ^ \ +? \ D + $ which means "alternately after the beginning of a string with a plus sign after one or more points". Your regex now just tests for a string that starts with one or more digit characters Change intRegex as such: < Code> var intRegex = / ^ \ +? \ D + $ / / On a side note, what you can do when you take the place in your first line: var Nom = $ ( "#AddKonId1"). Val (). Division ("") .join (""). Trim ();

Error: showStatusIcon on inactive InputConnection when Trying to Get Picture From Camera Android -

At this time I want to ask about my code below, it is simple to capture photo / photo from camera in Android Code, but the code is not working, this is my code below. package com.example.category.search; Import com.example.search.R; Import android App Import android.content.Intent; Import Android.graphics. Bitmap; Importroid.os.Bundle; Import android Prozar Mediastore; Import android.util.log; Import android.view.View; Import android.view.View.OnClickListener; Import android.widget.Button; Import android.widget.ImageView; Public class CreateData_Camera activity extension (personal button btCamera; personal image view ivCamera; personal static final string TAG = CreateData_Camera.class.getSimpleName (); Private static final integer CAMERA_REQUEST_CODE = 7777; @ Override Protected Zero Create (Bundle Saved InstantState) {Super.watcount (savedinstenstate); setContentView (R.layout.activity_camera); Btakemera = (button) Find VVBID (RID.bTACAMERA); IvCamera = (ImageView) findViewById

ios - In-app purchase rejected -

Image
My app has been rejected due to the following issue: Incorrectly applicable receipt verification, so it is fine between reviews (Sandbox) Environment and Production Environment Everything works well on my sandbox environment even though it is not even sure why this is happening. I have attached my code here, I hope someone can help me remember what I can remember. This code is triggered when the transaction inspector receives the payment queue call. #ifdef DEBUG #define STORE_URL @ "https://sandbox.itunes.apple.com/verifyReceipt" #endif #ifdef Release # DEFINE STORE_URL @ "https: //buy.itunes. Apple.com/verifyReceipt "#endif - (zero) can be retrieved JSONReceipt: (NSDT *) receipt and transaction: (SKPMant transaction *) transaction {// Receive JSON receipt NSError * error; NSDictionary * requestContents = @ {@ "Receipt-Data": [Receipt base64EncodedStringWithOptions: 0]}; NSDTa * RequestData = [NSJSNAsilizationDatwidthssonAbject: RequestAdvance Opt

matlab - Plotting many lines as a heatmap -

Image
I have a large number of files (~ 1000) from a data logger that I'm trying to process. If I want to plot the trend from one of these log files, then I can do this by using plot (time-value, data volumes) I would like to be able to see all these rows in a similar way at the same time, how an oscilloscope has "continuous" mode. Maybe I'm using something like histogram I can combine things, but hoping that this problem is a pre-existing or more elegant solution. You are suggesting yourself, that is, in order to plot the hematomap of signals, may do. Consider the following: I will build test signals (out of the sine waves of different dimensions), then through i hist3 and imagesc I'll plot the heatmap. This idea is to create a supporting signal that is a combination of all your time history (both in x and y ), and then the original Beavette removes statistics that % # test signal xx = 0: .01: 2 * pi; Center = 1; Eps_ = .2; Amps = li

java - How can I view integration tests in the Netbeans Test Results? -

My development environment is Netbeans 7.4 and Maven 3.0.5 (bundle with Netbeans). I am using Unit 4.11 for building the unit (name of the class ending with the test) and integration test (name of the class ending with IT) I am running a unit test and the "-cCPIT" menu option With the exception of the integration test. I have a custom action that only runs integration tests with the failsafe plugin. Both executed successfully. However, when I run a unit test, I only see the results in the "test results" window, how do I get an integration test to show in the "test results" window? With the integration test, I'm just looking at the output in the console. maven-failsafe-plugin executes only in integration maven -surefire-plugin test runs during the target . and verified (and of course help) goals. The Netbeans Test Result window shows tests performed only using the 'test' goal. My solution for this situation Testinayation

python - NLTK NaiveBayesClassifier training -

For example, I'm following online, the only way to train a given classifier is to do it well Bad tweets on the list of good lists I think training on only negative and positive words will provide a lot of data and therefore more accurate results are negative than many examples of positive and negative tweets And a list of positive words are very easy to meet. In that case, you can use single words instead of sentences. In this way, it will fit according to the example you mentioned. Neg_tweets = [('Hate', 'Positive') ('Bad') ('Angry', 'Positive'), ('Good', 'Positive'), 'Negative']] Pre>

ios - Specify the path of texture image for SKSpriteNode -

I need to get some images from the folders of my iOS app bundle. However, in my case it is possible that one Have more images, who have the same name. Obviously, SKSpriteNode's initWithImageNamed: method will not help here. To know the exact path of each image, is there a way that I can use the method when searching the image? I know about the solution but it is mentioned that by implementing that solution, I will lose cash and optimization which come with the initWithImageNamed: method. Is there any other way? Note: It is not possible to use texture atlas because the images are large (2048 px x 1536px). I get more errors than the maximum dimensions from the Atlas Generator when I tried. no You can not do multiple pictures with the exact same name. If you have "images" with the same name, then there is something wrong with your code logic.

multithreading - Java Thread random output -

पब्लिक क्लास रौफ {/ ** * @ परम आर्ग्स * / पब्लिक स्टेटिक व्हायर मेन (स्ट्रिंग [] एआरजीज़) {// TODO ऑटो-जनरेट किया गया विधि स्टब TestThread1 testThread1 = नया TestThread1 (); TestThread2 testThread2 = नया TestThread2 (); testThread1.start (); testThread2.start (); // testThread1.stop (); Println (testThread1.getName ()); Println (testThread2.getName ()); }} वर्ग TestThread1 थ्रेड {सार्वजनिक शून्य चलाता है () {System.out .println ("MyThread1 चल रहा है ::" + System.currentTimeMillis ()); }} वर्ग TestThread2 विस्तारित थ्रेड {सार्वजनिक शून्य रन} {System.out .println ("MyThread2 चल रहा है ::" + System.currentTimeMillis ()); }} हर बार जब मैं इसे निष्पादित करता हूं। / Code> अगली बार MyThread1 चल रहा है: 13987520 9 0142 थ्रेड-थ्रेड -1 MyThread2 चल रहा है :: 1398752090142 अगला थ्रेड -0 माइट्रेड 1 चल रहा है :: 13987520 9 0142 थ्रेड -1 मैथ्र्रेड 2 चल रहा है :: 13987520 9 0142 क्या कोई कृपया समझा सकता है कि ऐसा क्यों हो रहा है? धन्यवाद। यह एक थ्रे

Issues running CAMEL JAR file built in windows using Eclipse when run in Linux command line using JAVA or MVN command -

I have created a camel project with Elypes Mevern dependencies It ran successfully and it also went to the jar file and went from command prompt which is running as needed, but when I moved the jar file to our linux machine, which is like a job manager server and when I run the jr file below I try to get the error message below. Is obtained. When I try to run with the command given below $ java -jar mycamelproject I am getting the error below, but I have dependency dependency down in the dependency-jar folder. Thread "main" java.lang.NoClassDefFoundError exception: java.lang.Class.getDeclaredMethods0 (Native Method java.lang.Class.privateGetDeclaredMethods on org / springframework / C java.lang.Class in) (Class.java:2531) on .getMethod0 java.lang.Class.getMethod (Class.java:1663) sun.launcher.LauncherHelper.getMainMethod (LauncherHelper.java:494) on sun.launcher.LauncherHelper.checkAndLoadMain (Class.java:2774) (LauncherHelper . Java: 486) caused by: java.lang.Clas

Internal working of linux command -

If I want to know the internal functioning of any Linux command, where will I get information about it? Actually I want to know the internal work of the aplay command; What processes are there in the Linux kernel by executing the command? Linux is in user level, so when we implement the command from the user level, this kernel Will interact with the layer. This conversation is done through system calls. You can use the user space utility "stress" to get the internal calling system call. Trace system trace will give you the following command: $ script $ strace & lt; Command & gt; & Lt; Logic & gt; The script utility creates a file named "typescript" in an existing file that contains the output Strace. Now from Stairs you will know where all the system calls are running. You can also use the systemtap and kgdb linux utilities.

trigonometry - Code motion optimization of trigonometric function[cos(\theta)] -

As we know trigonometry functions take more CPU cycles if we want to reduce the CPU cycle, Need to implement optimization. I have such code: for (i = 0; i & lt; n; i ++) {for (j = i + 1; j & Lt; n; j ++) {Val1 = Some values ​​after calculation val2 = cos (val1); }} I now need to optimize (especially code speed optimization) function (KOS), so that it can take a lower CPU cycle. Hint: We can use two arrays of size result The result for the desired precision is the fastest way to use the precompute and lookup table.

apache - mod_rewrite URI with same name as folder or files -

इस के साथ एक सरल। Htaccess फ़ाइल: पुनर्लेखन इंजन पर पुनर्लेखन / पुनर्लेखन नियम ^ webshop $ /index.php?page=webshop [L] ... मेरे लिए काम नहीं करता क्योंकि एक फ़ाइल है जिसे webshop.php नामक वेब रूट में कहा जाता है। फाइल का नाम बदलने से पल्लें हल हो जाती है, और .htaccess फ़ाइल में regex को बदलने से समस्या हल होती है, लेकिन अभी भी - यह केवल फ़ाइल नाम का एक आंशिक मिलान है ...? निर्देशिका स्लैश बंद मैंने कोशिश की है और इसका कोई फर्क नहीं पड़ा। < P> यहां कुछ मदद की ज़रूरत है, इस पर एक बहुत ही सरल उपाय होना चाहिए। आपके पास सबसे अधिक संभावना है मल्टीविज़ विकल्प सक्षम किए गए हैं विकल्प मल्टीविज़ का उपयोग अपाचे की सामग्री वार्तालाप मॉड्यूल द्वारा किया जाता है जो कि mod_rewrite से पहले चलाता है और अपाचे सर्वर फ़ाइलों के एक्सटेंशन एक्सटेंशन बनाता है इसलिए / file यूआरएल में हो सकता है लेकिन यह /file.php परोसता है। इसे अपने .htaccess के शीर्ष पर रखकर इसे अक्षम करें: विकल्प -मल्टी Views

Eclipse(+AppEngine SDK) & Google "push-to-deploy" GIT repository -

Is Eclipse (with the AppEngine SDK plugin) and it is possible to use Google to "push-to-deploy" together? I've managed to install "gcloud" -tools and fix a project! But now I do not know how to combine the eclipse project structure and the structure prepared by "Gicked Ent". I mean, I would like to do this: 1) Use Eclipse to edit the app and test it in the development server already 2) but instead Google "Push-to-Diplos "GIT repository (instead of GitHub) Is it possible or possible and there is some instruction in how to do this project correctly. Thanks for any suggestions! After some more experiments with Gcloud (Google Cloud SDK) I would recommend creating a project with Maven and Maven's creation & amp; Running the Development Server You can still import the Maven Project in Elysees and use it as a Java Editor + Remote Debugger. Here are the instructions to get started: In addition, Google AntiPoint Is a good tool to

android - How to custom switch button? -

Image
I would like to become as custom list button: how to get it? Color and text change You can use the following code: <> pre & lt; org.jraf.android.backport.switchwidget.Switch android: id = "@ + id / th" Android: Layout_width = "Match_parent" Android: Layout_height = "Wrap_content" app: thumb = "@ drawable / apptheme_switch_inner_holo_light" app: Track = "@ drawable / apptheme_switch_track_holo_light" app: textOn = "@ string / switch_yes" app: textOff = "@ string / switch_no" Android: textcolor = "# 000000" / & gt; Create .xml in xml designated colors res / values ​​folder: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Resources & gt; & Lt; Color name = "red" & gt; # Ff0000 & lt; / Color & gt; & Lt; Color name = "green" & gt; # 00ff00 & lt; / Color & gt; & Lt; / R

python - What's the corresponding option of CURLOPT_ACCEPT_ENCODING in pycurl? -

pycurl is a python binding for liburl. For most of the options, libcurl is similar in pycurl. But I can not find people for CURLOPT_ACCEPT_ENCODING and CURLOPT_TRANSFER_ENCODING. Anyway, I am using Ubuntu 13.04, and the Pacal version 'libcurl / 7.29.0 GnuTLS / 2.12.23 zlib / 1.2.7 Libidan / 1.25 Libreng / 2.3' < / Div> I found a pycurl.ENCODING option in pycurl. c.setopt (c.ENCODING, 'gzip, deflate') and captured the traffic with the stars, < Pre> accept-encoding: gzip, deflate has been added. Then pycurl.ENCODING should be a compatible option of CURLOPT_ACCEPT_ENCODING. According to the option CURLOPT_ACCEPT_ENCODING CURLOPT_ENCODING was called before libcurl 7.21.6. But I did not find CURLOPT_TRANSFER_ENCODING in Pictel.