Wednesday, 15 June 2011

python - rendering html in django template? -


I know that this question has been asked before, but none of them is working in my case. My HTML string is being provided as much as it is. I am storing a successful message like this:

  msg = 'You & lt; A href = "some_url" & gt; Getting started with MDN & lt; / A & gt; Messages.success (request, message)  

and the notification is stored in the [] variable:

  {% Message%} Notifications: [ Message in% message {} {% message.tags or waffle.flag ('redirect_messages')%} {Message: {% autoescape off%} "{{message}}" {% endautoescape%}, no 'wiki_redirect' in tag Is: "{{Message.tags}}", Level: "{{message | level_tag}}"} {% if not loop.last%}, {% endif%} {% endif%} {% endfor%}] , {% Else%} Notification: [], {% endif%}  

Is there a syntax error? If I render it directly, then this method works. However, notification: [message: Using "{{message | safe}}" or autoescape, the message does not seem to be stored securely both.


php - Understanding and tracing Apache error: Wordpress database -


I have a hard time understanding what this recurring entry is saying in my Apache error log. It is at irregular intervals for at least 1 / hour in 1 minute for a couple.

  select wp_em_events include wp_em_events.post_id where wp_em_locations.location_id = wp_em_events.location_id Left wp_em_locations ( `recurrence` are! = 1 or` recurrence` zero) and (event_start_date & gt; = Cast (in as 03/16/2015 "date) or (event_end_date & gt ;! = cast (" as 03/16/2015 "date) and event_end_date = '0000-00-00' and event_end_date zero) ) and (array) and ( `event_status` = 1) and (` event_private` = 0) by event_start_date ASC is not required 50 OFFSET 0 gROUP bY wp_em_events.post_id order LIMIT ( 'WP- blog header. Php '), WP, WP- & gt; Main, WP- & gt; Query_posts, WP_Query-> Query, WP_Query-> Get_posts, wp_Query-> parse_query, do_action_ref_array, call_user_func_array, em_ical_item, em_locate_template, include ( '/ plugins / get events manager / templates / templates / ical.php'), EM_Events ::  

The value < / P>

I have N. OT faced any front faces in front of this error. Although I believe this is affecting MySQL performance, where should I start?

After

I can not say that I have come across SQL queries that are being produced in Apache. Log files like before, but I will first disable the plug-in to see if the error output stops and if the display increases.

Then I'll start to see the Events Manager Forum articles that no one else had a similar problem I had a quick look but could not see anything, the link may also post on forums, Because there you can get some better support.

If the plug-in does not help digging in code and should increase the part of the search for that specific SQL query, the error of that code is entering the log and since then you will get the error To debug and to understand why this is happening, I am afraid without seeing that code and can not help much.


sql - Check for the existence of multiple columns -


I need to create a SQL change script which checks the existence of two columns in the table if these columns are present, The script will run the optical table to connect them. Below is an example of how we check for 1 column.

  does not exist  <(INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'table' and column = 'selection from ColumnC' *) / pre> 

Then I will call ColumnC and ColumnD This script needs to be checked.

After

You would like to run the query once for each column, unless there is no way There may be one in the table in the table, but not the other. Because if you check to be both columns at once, and only one of them exists, then you will raise the column ALTER table an exception to try to add both, after one of the columns already exists . Either be with you and once for every column or performance is important, write 3 statements ... one for both columns at once and then one for each column. The pseudocode will look something like this:

  No column alter table is present ... the other two columns if Columna is present and does not change in the ColumnB table ... ColumnB add else if ColumnB is present and Adding Columna does not change the table ... Adding Columna  

Something like this is the table that both columns ...

  are missing selection Will come back * from INFORMATION_SCHEMA.TABLES Where TABLE_TYPE = 'base table' and does not exist (select * from INFO Where is RMATION_SCHEMA.COLUMNS C.TABLE_CATALOG = T.TABLE_CATALOG and C.TABLE_SCHEMA = T.TABLE_SCHEMA and C.TABLE_NAME = T.TABLE_NAME and C.COLUMN_NAME ('Column 1', 'Column2'));  

Be sure to refer to the tables so that you do not accidentally try to change any view.


how to show SSAS value side by side in Excel 2010 Pivot Table -


I think this question is more than one related to Excel, but what I am doing here, I have an SSAS cube Is Using Excel 2010

If rows have the same dimension for a selected period, then I want to look at the values ​​/ measures. I have tired all the pivotal choices which I know but it has no use, please help me I have attached an example below. Thanks.

Example: Enter image details here i like this Want to see data from: Enter image details here

Click on the "Design" tab for your pivot table device and change the report layout. You can choose a consistent form, outline form or compact form. Repeat All Items Label is the option that you want to choose.

I will probably select "Repeat All Items Label" and then I will change it to a table form.


php - Getting 500 internal error by using recursive function -


I get an internal error while calling under the recursive function.
Function Reference ID (A type of parent ID) In ​​the matrix table, if reference ID is available then the performance in the matrix table should be returned to that ID, but if the ID is not found in the matrix table, then that reference reference id (Enroller_id) from the members table of that old reference ID (stored in $ Ref_id) and call that function again and continues to call it until it Elegant ID is not available is not available or in the matrix and in the end that did not get it the default ID ($ default_ref_id) return.

But I do not know why I am getting an internal server error, I have tried even max_execution_time by maximizing 30 to 50 or 100 but it can not be fixed.

Please be good if you can get help from me that I have been stuck with this issue since the last 3 to 4 hours.

Here is the function I created in:

  function findR EferralMember ($ ref_id) {$ default_ref_id = 1; $ Count_ref_member = GetSingleValue ("Matrix", "Calculation (*)", "Member_ID = '" $ Ref_id. "'"); If ($ count_ref_member> gt; 0) {Return $ ref_id; } And {$ ref_id = GetSingleValue ("members", "enroller_id", "member_id = '" $ Ref_id. "'"); FindReferralMember ($ REF_ID); } Return $ Default_ref_id; }  

Your code is in the endless loop. $ count_ref_member is calling find referral message again again for each call find referralmail for the

The variable is never greater than zero. This endless loop is never returning, and eventually exits the stack on the server, returning this 500 error message.

Trace through your code and see why this infinite loop is happening. Fix endless loop and 500 error will end.


java - c3p0 do not timeout when are impossible to reach the host -


The first time when my program is open, try to connect to the database, if c3p0 closes it And freeze any error message.

The strange thing is that I got java.net.UnknownHostException with MySQL , but with SqlServer something Not even this, it keeps trying forever.

I want to catch error and do something. I tried to set this property but there was no luck.

  & lt; Property Name = "hibernate.c3p0.timeout" value = "60" /> & Lt; Property Name = "hibernate.c3p0.unreturnedConnectionTimeout" value = "60" />  

My persistence.xml

  & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Persistence version = "2.1" xmlns = "http://xmlns.jcp.org/xml/ns/produstence" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" XSI: Schema Locations = "Http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> & Lt; Persistence Unit Name = "Default" Transaction Type = "RESOURCE_LOCAL" & gt; & Lt; Provider & gt; Org.hibernate.jpa.HibernatePersistenceProvider & lt; / Provider & gt; & Lt; Classes & gt; Com.lala.Something & lt; / Square & gt; & Lt; Share-cache-mode & gt; Nobody & lt; / Share-cache-mode & gt; & Lt; Properties & gt; & Lt ;! - Connection - & gt; & Lt; Property Name = "javax.persistence.jdbc.url" value = "jdbc: sqlserver: // localhost \\\\ SQLEXPRESS: 1433; database name = string" /> & Lt; Property Name = "javax.persistence.jdbc.driver" value = "com.microsoft.sqlserver.jdbc.SQLServerDriver" /> & Lt; Property Name = "javax.persistence.jdbc.user" value = "teste" /> & Lt; Property Name = "javax.persistence.jdbc.password" value = "teste" /> & Lt ;! - Hibernate - & gt; & Lt; Property Name = "hibernate.format_sql" value = "false" /> & Lt; Property Name = "hibernate.show_sql" value = "false" /> & Lt; Property Name = "hibernate.use_sql_comments" value = "false" /> & Lt ;! - c3p0 - & gt; & Lt; Property Name = "hibernate.connection.provider_class" value = "org.hibernate.connection.C3P0ConnectionProvider" /> & Lt; Property Name = "hibernate.c3p0.min_size" value = "1" /> & Lt; / Properties & gt; & Lt; / Persistence unit & gt; & Lt; / Persistence> If c3p0 tries to get a connection from a database, and attempts to "hang" those acquisition attempts, then  

notification draconock and will be reconstructed automatically.

Two qualities that you have attempted to set up, neither two of them are relevant to the trouble. If you want to work around these braces, then c3p0 will look for the configuration properties.


How to serve specific static files with nginx? -


itemprop = "text">

/ api / lang? There are queries like Lang = en , which I want to serve with nginx as /server/i18n-angular/en.json . How can I do this?

I have the following directory structure:

  / public / /server/i18n-angular/en.json  

I have The following is the configuration, but NGNX states that it is wrong to use Index Directive at that time.

  server {root / public ... location / API / lang {if ($ Args ~ * "\? Lang = (. +)") {Set $ ​​language $ 1; Index ../server/i18n-angular/$language.json; }}}}  

Which direction should I use instead of index ?

"index" specifies the index file to display a folder, so you do not need it is.

You need to "rewrite" instead:

  space / API / lang {aka / server / IILN-angle; If ($ Argge ~ * "\? Lang = (. +)") {Set $ ​​language $ 1; Rewrite ^ / (. *) $ / $ Language.json; }}  

python - pass variable value to template after receiving a POST request every 5 sec -


There is a problem after my request and I get the variable msg my template login.html is still empty and I want to see that the message has been received. '

app.py

  from the flask import flask, render_template, reading, url_for, request app = flask (__name__) @ app. Root ('/ Reak', methods = ['GET', 'POST']) Def (): msg = None if request.method == 'POST': 'Request' value = if __name__ == '__main__': App.run (debug = true)  

login.html

  & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1.0" & gt; & Lt; Link href = "static / bootstrap.min.css" rel = "stylesheet" media = "screen" & gt; & Lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var test = function {$ (function () {$ .ajax ({type: "POST", url: "/ req", data: {'name': 'asdf'},})}}}} Window .setInterval (function () {test ()}, 5000); & lt; / script & gt; & lt; / head> gt; body & gt; {% msg msg} {{message}} # Empty page {% endif%}    

It seems that you are matching template rendering and Ajax.

Your Javascript test function Call your req viewing method in the back-end, which does renders a template, but You are not doing anything with that template.

Your msg variable that you are trying to print in the template, where your # is empty page Note will never be rendered, because there is no msg variable which is provided as none according to that base template. msg is set by posting via Ajax, but this provided template is never displayed.

If your goal is to see only msg on the output page, return your req method to only one POST : @ app.route ('/ req', methods = ['GET', 'post']) Def (): msg = none if request.method == 'POST': if request.values.get ('Name', none) == 'asdf': Return 'got' Return Rider_template ('login.html', msg = msg)

And in your Ajax call, / P>

  var test = function {$ (function () {$ .ajax ({type: "POST", url: "/ req", data: {'name': 'asdf' }, Success: function (data) {// 'string}});}); }  

If you really want to get your template back as you wrote it in question, then you are better off with the form to submit instead of Ajax so that you get a new page:

  @ app.route ('/ req', methods = ['GET', 'POST']) Def req (): msg = None if request.method == 'Post' : If request.values.get ('name', none) == 'asdf': render_template ('login.html', msg = msg) return render_template ('login.html', msg = none)  

and HTML:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1.0" & gt; & Lt; Link href = "static / bootstrap.min.css" rel = "stylesheet" media = "screen" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form Action = "/ Recycle" method = "Post" & gt; & Lt; Input type = "text" name = "name" & gt; & Lt; Input type = "submit" value = "submit" & gt; & Lt; / Form & gt; {% Msg msg} {{msg}} #empty page {% endif%} & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

c - Improper output using libusb -


I have created a program using libusb. I doubt if the output is correct because all entries show the same seller and product ID, the following is the code:

  #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; # Include & lt; Libusb-1.0 / libusb.h & gt; Zero print_devices (libusb_device * dev) {struct libusb_device_descriptor desc; Struct libusb_config_descriptor * config; Const struct libusb_interface * difference; Const. Composition libusb_interface_descriptor * interdesc; Const. Composition libusb_endpoint_descriptor * endpointdesc; Int rate; Int i, j, k; If (rate at lieutenant; 0) {fprintf (stderr, "Error obtaining device descriptor \ n"); Return; } Printf ("The number of possible configs is% d \ n", desc.bNumConfigurations); Printf ("Seller:% d \ n", desc.idVendor); Printf ("Product ID:% d \ n", desc.idProduct); Libusb_get_config_descriptor (dev, 0, and config); Printf ("Interface:% d \ n", config- & gt; bNumInterfaces); Printf ("\ n \ n"); } Int main (int argc, char * argv []) {libusb_device ** devs; Libusb_context * context = NULL; Size_t list; Size_t i; Int rate, temporary; Rate = libusb_init (& context); If (Rate End Lt; 0) {Explanation ("LibSub_Init"); Exit (1); } List = libusb_get_device_list (references, & devs); If (list & lt; 0) {fprintf (stderr, "error in getting device list \ n"); Libusb_free_device_list (devs, 1); Libusb_exit (reference); Exit (1); } Temp = (int) list; Printf ("\ n% d device found \ n \ n", temp); {// print device print_devices (devs [i]) for (i = 0; i & lt; temp; i ++); } Libusb_free_device_list (devs, 1); Libusb_exit (reference); Return 0; }  

And it is my output:

  Experience @ experience- Inspiron-3421: ~ / Desktop / usb $ ./usbtest 9 devices found number 0 product ID: possible configuration 103 vendor 0 interface: 1 number of possible configurations 103 vendors: 0 product ID: 0 interface: 0 product ID :: 0 interface: 2 number of possible configurations 1 number of possible configurations 103 vendors Has 0 Product ID: 103 Vendor is 0 Interface: 4 The number of possible configurations is 103 Vendor: 0 product ID: 0 interface: 0 product ID :: 0 Interface: 1 Number of possible configuration 103 1 is the number of possible configurations 103 vendors Seller: 0 product ID: 0 interface: 0 product ID :: 1 Number of possible configurations 103 vendor interface 0: 0 product ID :: 0 interface: 1 number 103 vendors of possible configurations 1  

this is what shows the lsusb:

  Experience @ Experience - Inspiron-3421: ~ / Desktop / usb $ lsusb Bus 002 Device 002: ID 8087: 0024 Ntel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID Ld6b: 0002 Lin UX Foundation 2.0 root hub Bus 001 Device 004: ID 064e: 812c Suyin Corp. Bus 001 Device 007: ID 0a5c: 2ld7 Broadcom Corporation BCM43142 Bluetooth 4.0 Bus 001 Device 003 : ID 0bda: 0129 Realtek Semiconductor Corp. RTS5129 card Reader controller Bus 001 device 002: ID 8087: 0024 Intel Corp. integrated rate matching hub Bus 001 device 001: ID Ld6b: 0002 Linux Foundation 2.0 root hub Bus 004 device 001: ID Ld6b: 0003 Linux Foundation Not 3.0 root hub Bus 003 Device 001: ID 1D 6B: 0002 Linux Foundation 2.0 root hub  

Need help finding errors (if any).

A line must be hidden from somewhere by mistake ... I recommend that you add the following line Otherwise ret is initial:

  int retired; Int i, j, k; Rate = libusb_get_device_descriptor (dev, & desc); // this line! If (rate at lieutenant; 0) {fprintf (stderr, "Error obtaining device descriptor \ n"); Return; }  idvendor  to print the output to  lsusb  with one of the   % x  Change the code> and using the  idProduct  hexadecimal format. 

  printf ("vendor:% x \ n", desc.idVendor); Printf ("Product ID:% x \ n", desc.idProduct);  

The following question was helpful to find the missing line. And it helped me add libusb , it recommends compiling it with gcc main.c -o main -lusb-1.0 .


python - Pandas: ValueError - operands could not be broadcast together with shapes -


मुझे add () और combine_first जैसे कार्यों को चलाने में निम्नलिखित रनटाइम त्रुटि मिलती है ( ) बड़े डेटाफ्रेम पर :

  मान त्रुटि: ऑपेन्डों को आकृतियों (680,) (10411,) के साथ एक साथ प्रसारित नहीं किया जा सकता  

प्रसारण त्रुटियां लगता है कि काफी नॉर्मल (मैट्रिक्स आयाम बेमेल) का उपयोग करते हुए, हालांकि मुझे समझ में नहीं आता कि यह मेरे मल्टी-इंडैक डाटाफ्रेम / श्रृंखला को क्यों प्रभावित करता है। प्रत्येक कॉन्टैक्ट-तत्वों से एक रनटाइम त्रुटि उत्पन्न होती है:

मेरा कोड:

  # मैं दो डेटाफ्रेमों को 1 में मर्ज करना चाहता हूं data1 और data2 # 'अनुरोध' कॉलम # पहले टकराव # p1.concat ([\ data1 ["शुरू"] पर डेटा 2-प्रविष्टियों को चुनने वाली # टक्कर # '' कॉलम '' पर पहले आंकड़ा 1-प्रविष्टियों को चुनते हुए 'शुरू' कॉलम को मर्ज करें। Combine_first (data2 ["शुरू"]), \ data2 जोड़ (डेटा 2 ["अनुरोध"], fill_value = 0) \], अक्ष = 1) ("अंत" Pre> 

मेरा डेटा:

  # डेटा 1 अनुरोधों का अंत आईपी sessionID शुरू होता है * 1. * 16. * 01.5 * 20 9 2011-12-16 13:06:23 2011-12- 16 16:50:57 21 3 2011-12-17 11:46:26 2011-12-17 11:46:29 22 15 2011-12-19 10:10:14 2011-12-19 16:10:47 23 9 2011-12-20 09:11:23 2011-12-20 13:01:12 24 9 2011-12-21 00:15:22 2011- 12-21 02:50:22 ... 6 * .8 * .20 * .14 * 6283 1 2011-12-25 01:35:25 2011-12-25 01:35:25 20 * .11 * 3.10 * 6284 1 2011-12-25 01:47:45 2011-12-25 01:47:45 [680 पंक्तियाँ x 3 कॉलम] # डेटा 2 अनुरोधों का अंत आईपी सत्र ID * 8.24 * .135.24 * 9215 1 2011-12- 29 03:14:10 2011-12-29 03:14:10 * 09.2 ** 22 * ​​.4 * 9216 1 2011-12-29 03:14:38 2011-12-29 03:14:38 * 21.14 * .2 ** 22 * ​​9217 12 2011-12-29 03:16:06 2011-12-29 03:19:45 ... 19 * .8 * .2 ** 1 * 1 62728 2 2012- 03-31 11:08:47 2012-03-31 11:08:47 6 * .16 * .10 * .155 77282 1 2012-03-31 11:19:33 2012-03-31 11:19:33 17 * .3 * .18 * .6 * 77305 1 2012-03-31 11:55:52 2012-03-31 11:55:52 6 * .6 * .2 * .20 * 77308 1 2012-03- 31 11:59:05 2012-03-31 11:59:05 [10411 पंक्तियां x 3 कॉलम]  

मैं डॉन ' टी पता है, शायद यह एक बग या कुछ और है, लेकिन स्पष्ट रूप से बताते हुए कि प्रत्येक सीरीज़ से [:] अपेक्षित काम करता है कोई त्रुटि नहीं।

  प्रिंट pd.concat ([\ data1 ["शुरू"] [:]। Combine_first (डेटा 2 ["शुरू"] [:]), \ data2 ["end"] [:]। Combine_first (डेटा 1 ["अंत"] [:]), \ data1 ["अनुरोध"] [:]। जोड़ें (डेटा 2 ["अनुरोध"] [:], fill_value = 0) \], अक्ष = 1 )  

amazon web services - AWS ruby sdk v2 - dynamodb query -


I have a hash (string) and range (number) table in DynamoDB I using Ruby SDK v2.0.30 I'm trying to run the query, but I'm getting the following error:

aws-sdk-core-2.0.30 / lib / seahorse / client / plugins / Raise_response_errors.rb: 15: In `call ': One or more parameter values ​​were invalid: Status parameter type does not match schema type (ASS :: Dynomodi :: errors :: validation exception)

Here is my code:

  Mani 'A VS-SDK', '~ & gt; 2 'Required' AAS-SDK 'Dyyamodb = AOS :: Dynamo DD :: Client. Anuu (region: "U-west -1 'credentials: Credits) resp = dynamodb.query (table_name:" TEST_TABLE ", Kunji_kodisn: {' id '= & gt; {comparison_operator:' EQ ', attribute_value_list: [{' S '= & gt;' test123 '}]}})  

I am new to Ruby and I have tried to look online and on AWS docs but nothing can be found Any help would be appreciated.

Thanks

Your error is how you formatted your query expression In the value of the hash key, v2 AWS SDK ( aws-sdk gem) for Ruby accepts all attribute value as the ruby ​​values.

  • Li> set (numeric / string)
  • array (integer, float, << li>
  • boolean
  • Io (blob type)
  • set (numeric / string) Value
  • hash (string => value )
  • You do not need to provide typed gesture for A1 Required with SDK.

      ddb = aws :: DynamoDB :: Client.new ddb.query ({table_name: 'TEST_TABLE', key_codition: {'ID' = & gt; {Comparison_operattor : 'EQ', attribute_value_list: ['test-123']}}})  

    its ala No, not directly related to your question, but you can find the following blog series useful: aws-sdk is working with Dynamo DB from Gem:


  • g++ - Linux program trying to load two different revision of a shared library at the same time -


    My problem looks a bit strange

    I have created a library, whose name is libJsonCpp. So, which I used in some programs and now I have just increased the revision number of that library from 2.12 to 2.13.

      [enzo @ P0101222 test] $ ls -la / prd / b_bcm / bin / LibJsonCpp.so * lrwxrwxrwx 1 enzo essays 18 Mar 16 16:52 / prd / b_BCm / bin / libJsonCpp. So-> LibJsonCpp.so.2.13 lrwxrwxrwx 1 ANZO essays 18 Mar 16 14:26 /prd/b_BCM/bin/libJsonCpp.so.2 - & gt; LibJsonCpp.so.2.13 lrwxrwxrwx 1 enzo essay22 Mar 16 14:26 /prd/b_BCM/bin/libJsonCpp.so.2.13 - & gt; LibJsonCpp.so.2.13.001-RWXR-XR-X1 Enzo Essays 286939 March 16 14:26 / Prod / B_BCM / Bean / LBJason CPP. SO.2.13.001  

    Strange thing is that programs which are using this library, try to load it twice, new revisions and old people

    When I check the program to see which library is needed, then I have an output like this:

      [Enzo @ P010122 MySmem Program] $ Ldd MySampleProgram libJsonCpp.so.2.13 = & gt; /prd/b_BCM/bin/libJsonCpp.so.2.13 (0x4002a000) libxerces-c-3.0.so = & gt; /usr/local/lib/libxerces-c-3.0.so (0x40061000) libnsl.so.1 = & gt; /lib/libnsl.so.1 (0x40438000) libpthread.so.0 = & gt; /lib/libpthread.so.0 (0x4044c000) libstdc ++ So.6 = & gt; /usr/lib/libstdc++.so.6 (0x40461000) ...... /lib/ld-linux.so.2 = & gt; /lib/ld-linux.so.2 (0x40000000) libJsonCpp.so.2.12 = & gt; Not found  

    As you can see the program for the new library (right)

      libJsonCpp.so.2.13 = & gt; /prd/b_BCM/bin/libJsonCpp.so.2.13  

    But for older people, who had been definitely removed

      libJsonCpp.so 2.12 = & gt; Not found  

    I have found that there is still no room in terms of old amendment, but I have not found anything. I have rebuilt the program and removed the cache files, but the problem is still here.

    So I'm asking if there is any suggestion about checking for this strange problem.

    Regards, Enzo

    I have the following error during the link to the program: It seems that the link /prd/b_BCM/bin/libJsonCpp.so indicates the old revision , But the link is linked to all new people (see above)

      G ++ -wast-year-west-work-virtual-dtor -Wno-long-long -Wbad- of function Artists -Wundef \ -Wall -pedantic W -Wpointer-arith -Wmissing-Prototype -Writite-Wire -ansi -D_XOPEN_SOURCE = 500 \ -D_BSD_SOURCE -Wcast Row -Wconversion -fno-Created GO2 -O0 -G3 -Wall I .. -Ibcm_plant -Ibcm_pane l -Ibcm_display -Ibcm_common I ../ bcm_panel I ../ bcm_display I ../ bcm_common \ -fno- exception -fno- Czech-new -fexceptions -rdynamic \ -me MySample program gestconfigbcmmessage.o clsmsgwritestatus.o testcr01.o util_panel .o updatefirmwaredisplay.o main.o \ /prd/b_BCM/bin/libJsonCpp.so./bcm_plant/libbcm_plant.a./bcm_panel/libbcm_panel.a./bcm_display/libbcm_display.a./bcm_common/libbcm_common.a/ usr / Local / lib / libxerces-c.so -lnsl -lpthread /usr/lib/libstdc++.so/l/ usr3/building/gcc/gcc-3.4.6/i686-pc- linux-gnu/lvstdc++-v3 / Src \ l / usr3 / build / gcc / gcc-3.4.6 / i686-pc- linux-gnu / libstdc ++ - v3 / src / .libs L / usr3 / build / gcc / gcc -3.4.6 / gcc \ L / usr / Local / lib L / PRD / b_BCM / src / b_BCM_common / module -leasyzlib -lftplib -Wl, - rpath -Wl, / usr / local / lib -Wl, - rpath -Wl, / usr / local / lib / Usr / bin / ld: warning: libJsonCpp.so.2.12, required by /prd/b_BCM/bin/libJsonCpp.so, not found (try to use -rpath or -rpath-link) [1]: directory `/ home leave 

    OK, I got the inquiry.

    For some strange reasons the new script has a reference to the old people.

      $ ldd /prd/b_BCM/bin/libJsonCpp.so 2.13 Libpthread.so.0 = & gt; /lib/libpthread.so.0 (0x4004d000) libJsonCpp.so.2.12 = & gt; Not Found / lib /ld-linux.so.2 = & gt; To / Lib /ld-linux.so.2 (0x80000000)  

    Fortunately enough for the reconstruction of the new library and went wrong dependency missing

    Your Support Thank you to Jonathan.

    Rigrds, Anjho


    assembly - Last instruction in a program (Computer architecture) -


    What happens after the last instruction is executed in a program? Let's say I have 16 bytes of RAM and there is a single program fitting in that space.

    The current instruction in the PC can be traced, so in the last instruction, do we have a STOP instruction? What does this STOP directive actually do and how is it implemented with hardware logic? Thank you.

    In the embedded system where there is no such thing as the operating system (OS), the program only never ends < / P>

    If you have a program that is in RAM and you forget to make an infinite, then you is to provide infinite loop elsewhere. Loop, then behaving undefined , the CPU will try to execute the waste in your program in the previous ram and will either crash, or execute the garbage until this program counter rolls back to the second meaningful area of ​​the address And another sub-routine (or it runs the same program again) the program counter is counted through the entire address space.)

    (Which I It was that the microcontroller did not apply to a sleep mode, but sleep mode and no OS (or only a very despicable one) were common in the CPU not back in the 80's.


    ssas - MDX error with aggregate -


    Text after "

    I MDX

      create member CURRENTCUBE. [Measure] with the following query. [Accuracy of labor hours] as the amount of assessment (case is when (1- [measure] [assessment difference] / gross ([measure] [real labor hours], [districts], [district], [ Work D] [Work.] [Job Description])) * 100>. 0 then (1 - [measure] [assessment difference] / gross ([measure] [actual labor hours], [districts] ], [Work de.] [Work]. [Job description])) * 100 ELSE 0 END), VISIBE = 1, ASSOCIEUUURUUURU = 'workf';  

    I got the following error

    MdxScript (Test) (52, 71) The AGGREGATE function was given a lot of arguments. Maximum argument number for function is 2.

    How to solve it?

    The error is easy to understand by most MDX error messages

    You can get this snippet There are three arguments:. [work] [job description]) P> Here is the MSDN definition: ...

    Gross (Set_Expression [, Numeric_Expression])

    After this definition, move your Numeric_Expression to the end and other expressions in front of it: / P>

       

    There should still be error then you will have to prepare one of the first two arguments:

      gross ({([ District [], [Work D]. [Work] [Job Description] [}}, [Measure]. [Real labor hours])  

    Your error message should now go .


    dns - How to translate a dictionary into a Domain object? -


    I have a third party repository (this is called an external resistor) which asks for a particular object The dictionary gives a key value of 30 - 100 keys / value can be added in this dictionary depending on the object.

    My application needs access to this external repository and instead of depending on its basis, I have started another layer (it is called a meripagrity) which is called and typed in the external repository Translate dictionaries into domain objects (each key / value couple making an asset in my domain pco), which my app can understand and use.

    With this design I am wondering if any good approach about how to implement this translation. Is writing a domain object in the form of properties for all key / value combinations and translating my only option into a single domain object? Here's a sample where my design is just fine.

    Class ExternalRepository {Language & lt; String, Object & gt; GetObjectA (); } Class MyRepository {A GetObjectA () {var dict = _externalRepository.GetObjectA (); Return MapToA (dict); } Use a mapshow (dictionary & lt; string, object & gt; dict) {// use something like an automaker for the map}} class A {public string Prop1; Public goods prop2; }

    In my real case, there are at least 30 different objects in it such that A has many different properties. Writing a domain poco for each and translating it sounds a bit tiresome for me, I've read a bit about using dynamic objects (or expendo objects), but using them as my domain object To be a little careful, can you think of any other way to reach it?

    thanks


    facebook group members Bio information -


    After

    I am interested in retrieving bio information of members of a Facebook group .

    I have created an app where I have requested permission of user_about_me and is being reviewed to present the application.

    I have code for the application in JSP but can only select name, gender, last_name, first_name this bio information selection not doing.

    I have the same problem in Graph API Explorer, when I use

      {group_ID} / members  

    I I can retrieve the list of all group members. But I can not see more details than the following:

      "data": [{"name": "name", "administrator": wrong, "id": "USER ID" }, When I click on the ID (or I can enter an ID in Explorer), I can only get the following:  
      {"id": "member_ID", "first_name" : "Name", "update_time": "2015" - "firstname", "last_name": "alias", "link": "https: //www.facebook.com/app_scoped_user_id / ...", "name" 02-07T10: 02: 58 + 0000 "}  

    This bio is not showing information when I enter the following Ta I:

      {member_ID}? Fields = bio  

    I just appreciate

      {"id": "10153223503039309"}  

    I would appreciate it If someone recognizes the problem I believe that this problem will solve the problem of my code, at this time I am unable to recover the bioinformatics of the member of the group.

    Is it possible that the problem is resolved after app approval?

    Sayed

    You can only get more information from the user because it is a member of some groups. To get more data you must give it to your app with the correct permission.


    Wix Installer Harvest Error in VS 2012 -


    I need some help. 2012, which I have chosen Wix Toolset v3.9 as the deployment method for my VB.NET application. I have participated in an issue which I have spent in hours and hoping that I can get some support from fellow Gods from there. Now to mention, I am using a Himachal Pradesh.

    I have created a setup project and he successfully created a project for my Wix installer in my solution. When I go to create it, it shows the following error:

    "Generate error during harvest: C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common. Targets (609, 5): Outputpath is not set for property project (mipple). Please make sure that you have specified the valid configuration of the configuration and platform for this project.Configuration = 'debug' platform = 'MCD'. Can see This message is because you are trying to create a project without a solution file, and have specified a non-default configuration or platform for this project.

    File: heat.exe "< / P>

    I have come to the articles related to the MCD related to the computer of Himachal Pradesh, so I thought that I also mention it. In fact, I just need to make .exe installer and this is a hard time with a stick.

    Thanks a lot!


    c# - Why is NServiceBus configuration broken after using TypesToScan() -


    I have a console app within which you can specify the parameters, depending on the specified parameter, different handlers will load. For example:

      prgm.exe nyse prgm.exe nasdaq  

    The goal is that in my code I have InyseHandlers And the Inside Handlers and in the first case only any handlers are loaded in advance, similarly for the case of the latter. The goal is to be a program, depending on how it is run, can listen to different or all sources. To get this, I have installed my interfaces as mentioned above. Then set up in my configuration:

      var configuration = new bus configuration (); Configuration.InitializeStepBusConventions (); // Extension method, no problem // Load all the handlers specified in the command line argument (! Args.Contains ("any") and Args.Length! = 0) {list & lt; Type & gt; Handlerload = new list & lt; Type & gt; (); Foreach (argument in args) {Console.WriteLine ("Adding Clients to Loaded Handlers ...", Logic.Tupper ()); Switch (logic) {case "nyse": AddToHandlerList (handlertoolload, typef (INyseProcessor)); break; Case "Nasdaq": AddToHandlerList (HandlerToldload, TypeF (InsadProcessor)); break; }} Configuration. Typeshotcan (handlerload); } Configuration. Euskentner & lt; NinjectBuilder & gt; (C => c.ExistingKernel (kernel)); Configuration.EndPoint (ConfigurationManager.AppSettings [Default.Project.DefaultEndPointName]); NServiceBus.Logging.LogManager.Use & LT; NLogFactory & gt; (); Bus.Create (configuration) .start ();  

    and where:

      Private Zero AddToHandlerList (list  handlerSoload, type interface type) {list & lt; Type & gt; ClassesWhichExtendInterface = Assembly.GetExecutingAssembly (). GetTypes () Where (t = & gt; interface type. IssaGonfal Fm (t)). ToList (); ClassesWhichExtendInterface.Remove (interfaceType); HandlersToLoad.AddRange (classesWhichExtendInterface); }  

    Types are loaded as expected, so the list is fine but when I run it and just In the Start line, I get the following error:

      The key given was not present in the dictionary (NSISBBS.LocalEdress) dictionary.  

    Without type loading, the default behavior works fine and all the processors are loaded within the assembly. Why am I getting this error after running the typesToScan () line?

    Edit: The extension method here is:

      config.UseSerialization & lt; JsonSerializer & gt; (); Config.UseTransport & LT; RabbitMQTransport & gt; (); Config.UsePersistence & LT; InMemoryPersistence & gt; (); Config.EnableInstallers (); Return configuration;  

    Your exception is here

      localAddress = Address .Parse (Settings.Get & lt; String & gt; ("NServiceBus.LocalAddress"));  

    The setting is determined by a transport by the "NSIRBBS.Local adapter" kppp. Since you are not using "core" transport (MSMQ), I suspect that your transport assembly type needs to be included in the typewrite scan, due to:

      ForAllTypes & lt; Feature & gt; (TypesToScan, T => FeatureActivator.Add (T. Constrict & Lt; Feature & gt; ());  

    I had a similar problem with the use of SQL Server Transportation, when I send a list to assemblies (assemblies) and there does not include the NSCRAS assemblies, the transport starts Failed to do As soon as I added NSverbis. * Legislatures, everything started to work.


    Find data file in Zip file using microcontroller -


    I need a microcontroller to read a data file that is stored in a zip file (actually a Custom file format, but it is irrelevant). The data file has a known name, path and size, and uncompressed is guaranteed to be stored. What is the simplest & amp; Fastest way to start file data without writing a file in a zip file?

    Note: I know about the zip comment section, but the data file in question is too large to fit in it. I ended up writing a simple parser which finds the data of the data using the central data directory.


    upload file jquery wordpress -


    I want to change the input button uploaded images in front-end in my wordpress theme. I have read that it is possible with fileupload.js and I try unsuccessfully with the code below.

      & lt; Input id = "fileupload" type = "file" name = "files []" data-url = "server / php /" multiple & gt; & Lt; Div id = "progress" & gt; & Lt; Div class = "bar" style = "width: 0%;" & Gt; & Lt; / Div & gt; & Lt; / Div & gt; $ ('# Fileupload') Fileupload ({/ * ... * / progressall: function (e, data) {var progress = parseInt (data loaded / data quote) * 100, 10); $ ('# Progress .bar'). CSS ('width', progress + '%');}});  

    And this is a PHP code for file transfer:

      if ($ _FILES) {$ files = $ _FILES ['upload_attachment']; ($ Files ['name'] [$ of]) {$ file = array ('name' = & gt; $ files ['name $] [$ Key],' type '= & gt; $ files [' type '] [$ Key],' tmp_name '= & gt; $ files [' tmp_name '] [$ key],' error '= & gt; files [' error '] [$ key],' size '=> ; $ Files ['size'] [$ of]); $ _FILES = array ("Upload_Attempt" =>; $ file); Forex currency ($ $ $ FILES = file = & gt; $ as array) {$ newupload = wpcads_inert_attachment ($ file, $ post_id); }}}} Wp_redirect ($ permalink); Go out;  

    I have to show this kind of input file or is it possible?


    javascript - How do I test an Angular directive that requires another controller in Angular 1.3.14? -


    I am trying to write a Jasmine test for an instruction that requires parental instructions to be present . I got this question: However, it's a bit late (Carl 1.1.5 I believe), and Plunker does not work with new versions of Jasmine (2.2.1) and Connor (1.3.14). I get:

      Type error: There is no function on undefined object. & Lt; Anonymous & gt; (Http://run.plnkr.co/AHQtPtvSezB4DsnJ/appSpec.js:18:33)  

    Here is the code: var app = angular. Module ('plunker', []); {F}, app directive ('foo', function () {returns} {restriction: 'e', ​​controller: function ($ scope) {this.add = function (x, y) {return x + y;}} };}); (Scope.callFoo = function (x, y)) (scope.callFoo = function (), (), {Scope.sum = foo.add (x, y);}}};});

    and test:

      Description ('test instructions', work () {var $ scope, $ compilation, element; {Module ('plunker'); injection (function ($ rootscope, _ $ compile_) {$ scope = $ rootScope. $ New (); $ compile = _ $ compile_;});}); ('Callfoo Var $ fooController = Whatever is considered for the element, this function () [// Set  

    Thank you with this time!

    In answer to this question mentioned above, method # 3 did great work, I apparently did not have much Read


    java - Error in ls(envir = envir, all.names = private) : invalid 'envir' argument in R -


    I met this error when I used a package in R to load the data, in this package, pakcage < Code> rJava was used.

    Error every time I run a function

      error in LS (envir = envir, all.names = private): invalid 'This package can be either Without proving the problem, my computer has some environmental problems.  

    When I debug did, I found out that before this process ls (envir = envir, all.names = private) variable envir Is NULL , which should be some value, but do not tap me.

    After some tests, I solve the problem every time by setting up rjava and besides, only when the error occurs, I install 'Jaza' , This will work if I am already established, then this will not work. Therefore, I think that setting up of 'Jaza' (or possibly installing packages) will change some environmental variables.

    Either Java 7 and Java 8, which includes JDK or JR, are not working. And for R, I am using 3.1.3 R and all packages are up-to-date.

    There is some information that I think can be useful for troubleshooting.

    To install the package, add jvm.dll to the Windows Environmental Path: "Path" and I did this.

    My Satranukrm is shown below:

      R version 3.1.3 (03/09/2015) platforms: x86_64-W64-mingw32 / 64 (64-bit) running under (build 7601) Windows 7 x64 with Service Pack 1 location: [1] LC_COLLATE = Danish_Denmark.1252 LC_CTYPE = Danish_Denmark.1252 LC_MONETARY = Danish_Denmark.1252 LC_NUMERIC = C [5] LC_TIME = Danish_Denmark.1252 attached base packages [1] grid statistics graphics grDevices utils dataset methods based on other enclosed packages: [1] rgdal_0.9 -1 Fild_8k2-l Spam_lk0-l Rastr_2k3-33 sp_1.0-17 ecomsUDG.Raccess_2.2- 6 [7] downscale R_0.5-2 maps_2.3-9 downscale r Jawa_0k0- 2 rJava_0.9-6 gWidgetsRGtk2_0.0-83 cairoDevice_2.22 [13] RGtk2_2.20.31 gWidgets_0.0-54 R.utils_2.0.0 R.oo_1.19.0 R.methodsS3_1.7.0 through a namespace loaded (not attached): [1] abind_1.4-3 bitops_1.0-6 boot_1.3-15 CircStats_0.2-4 colorspace_1.2-6 dtw_1.17-1 lattice_0.20-30 MASS_7.3- 39 [9] munsell_0.4.2 plyr_1 .8.1 proxy_0.4-14 Rcpp_0.11.5 RCurl_1.95-4.5 scales_0.2.4 tools_3.1.3 verification_1.41  

    If you can provide any help Thanks for that.

    Have you completely solved your problem? I had a similar problem a few days ago, solved it and wanted to share it with the community. In fact, call those wrapper functions (in my case, RBBG package), in RJVA functions there was a log file in your user folder under C drive, you can remove those log files because it helps you to avoid error messages. Will meet

    In my case, I need to remove org.findata.blpwrapper.0 files created by blpjavaapi0.log.0 and Rbbg package.


    php erro with delete in table mysql -


    Text after "

    I have a problem deleting the columns of my base.

    When I php script, nothing happens. . If anyone can help me

    My database tournaments; Tournaments in the table * / INSERT INTO Tournaments (nomTournament, nbPlayersMax, nbPlayersAct, dateStart, kindTournament_id, avancement, code, membre_mail) Prices ('MyTournamentFootball', '8', '0' , NOW (), '2', '0', '6148', 'aa@gmail.com'); INSERT INTO Tournament (nomTournament, nbPlayersMax, nbPlayersAct, dateStart, kindTournament_id, Avancement, Code, membre_mail) Prices ('MyTournamentFootball2', '4', '0', NOW (), '1', '0', '5691' 'Aa@gmail.com');

    And now to delete my php code:

      & lt; Php session_start (); Include ('config.php'); $ NomTournament = 'My Towerboard Football 2'; $ Code = '5691'; // Quantify application data $ query = $ handler- & gt; Prepare ("Remove from tournament WHERE nomotournament =: nom training and code =: code;"); // Force the parameters $ query- & gt; Baidam Parm (': nomTournament', $ nomTournament, PDO :: PARAM_STR); $ Query-> BindParam (': code', $ code, PDO :: PARAM_INT); // execute queue queue $ query- & gt; carry about (); ? & Gt;  

    I know the code is simple but it does not work, so if you can help me.

    Thanks

    Michaël


    javascript - Get notifications from flash file in html -


    I am running a flash file in an html embed tag in the html file. As soon as the flash is over, I need to run an action in JavaScript (say "alert"). How can I work

    This is a nice tutorial how to:

    If you insist on the event on the last frame If you want to, use EnterFrame like:

      addEventListener (Event.ENTER_FRAME, someFunction); Personal Function Some Functions (E: Event): Zero {if (currentFrame == totalFrames) {removeEventListener (Event.ENTER_FRAME, some functions); // some external interface event fire}}  

    mysql - how to calculate datediff in row -


    तालिका रोगी

    टेबल प्रवेश

    यहाँ छवि विवरण दर्ज करें

    तालिका tbl_master

    tbl_action

    यहां छवि विवरण दर्ज करें

    मैं अलग समय fibrinolytic_datetime गणना की जरूरत है -। admission_datetime और मेज प्रवेश क्षेत्र fibrinolytic एसके है

    मैं कोशिश

      का चयन करें admission.AN, admission.HN, pat_name, pat_lname , फाइब्रिनोलिटिक, DATEDIFF (डी ate_time, (tbl_action से DATE_TIME का चयन करें जहां tbl_id = "tbl001")) से रोगी, प्रवेश, tbl_action कहां admission.HN = patient.HN और admission.AN = tbl_action.AN और fibrinolytic = "एस" और tbl_id = "tbl002" < / Code> 

    लेकिन phpmyadmin से प्रतिक्रिया "सबक्वरीय 1 से अधिक पंक्ति देता है"

    मुझे कुल

    आपकी साइट पर जुड़ें आपके कोड की बजाय इनर से सम्मिलित हों से तालिकाओं

    आपकी उप क्वेरी अधिक 1 मूल्यों को लौट रही है क्योंकि आपके पास तालिका में 3 पंक्तियां हैं tbl_action < / code> कोड के खिलाफ <> tbl_Id = "tbl001"

    <कोड> tbl_action से चयन DATE_TIME कहां tbl_id = "tbl001"

    आप करने के लिए है विशिष्ट इस क्वेरी की जहां खंड में कुछ विशिष्ट आईडी जोड़कर DATE_TIME जो आप देख रहे हैं की पहचान

    <कोड> का चयन करें DATE_TIME tbl_action से कहां tbl_id = "tbl001" एक nd एक = "AN001"

    संपादित करें

      का चयन करें admission.AN, admission.HN, pat_name, pat_lname, fibrinolytic, DateDiff (DATE_TIME, (tbl_action से DATE_TIME का चयन करें जहां tbl_id = "tbl001" और एक = "AN001")) से रोगी आंतरिक में शामिल होने के प्रवेश admission.HN = patient.HN भीतरी पर admission.AN = tbl_action.AN जहां प्रवेश पर tbl_action में शामिल हो। फाइब्रिनोलिटिक = "एसके" और tbl_action.tbl_id = "tbl002"  

    c# - Linking to Home with LinkManager and languageEmbedding="always" -


    इस सवाल का पहले से ही एक उत्तर है: < / P>

    • 3 जवाब

    मैं एक बहुभाषी वेबसाइट का निर्माण कर रहा हूं साइटकोर 7.5 में, और मैं हमेशा यूआरएल की शुरुआत में भाषा को दिखाना चाहता हूं, उदा mysite.com/en/article1.aspx

    इसे प्राप्त करने के लिए, मैंने languageEmbedding = "के साथ ब्लॉग के अनुसार LinkManager कॉन्फ़िगरेशन को पैच किया है हमेशा "। अब, जब Sitecore.Context.SetLanguage () के माध्यम से भाषा को बदलते समय, यूआरएल इसी प्रकार के लिंक्स कोड पर सही ढंग से बदलता है, जैसे कि लिंक पर निम्नलिखित ... अब तक बहुत अच्छा!

    < P> समस्या उत्पन्न होती है जब मैं घर तत्व से लिंक करने का प्रयास करता हूं, उदाहरण के लिए एक रीडायरेक्ट के माध्यम से:

      var homeItem = Sitecore.Context.Database.GetItem (& lt; GUID को घर & gt; ); Var url = LinkManager.GetItemUrl (homeItem); (यूआरएल) पुनर्निर्देशित करें;  

    परिणामस्वरूप यूआरएल mysite.com/en.aspx है, जो कि Default.aspx नामक एक पृष्ठ को दिखाता है वेबसाइट रूट फ़ोल्डर में स्थित है । बेशक, मैं इसे mysite.com/en / को निर्देशित करना चाहता हूं, जो कि दी गई भाषा में घरेलू आइटम से मेल खाती है और मैन्युअल रूप से दर्ज होने पर काम करती है।

    ऐसा लगता है मुझे कि LinkManager में एक बग है, इसलिए यह यूआरएल में भाषा को एम्बेड करते समय सही ढंग से घर के मद को हल नहीं कर सकता। या यह सिर्फ मुझे है जो एक गलती की है?

    क्या किसी को इस समस्या को ठीक पता है? पिछला स्लैश जोड़ने के लिए मैं LinkManager कैसे प्राप्त करूं?

    UPDATE यह मेरी सामग्री के पेड़ का एक स्क्रीनशॉट है:

    यहां छवि विवरण दर्ज करें

    डिफ़ॉल्ट.aspx के बारे में आपको मिलता है यह एक MVC बात संभव है कि आप इसे एक आवेदन को एक global.asax में जोड़कर ठीक कर सकते हैं Application_Start () एक सिस्टम। वेब। रूटिंग। RouteTable.Routes.RouteExistingFiles = true;

      संरक्षित शून्य Application_Start () {System.Web.Routing.RouteTable.Routes.RouteExistingFiles = true; }  

    देखें और

    मैं आपकी यूआरएल को अपनी इच्छा के अनुसार नहीं बदलता, लेकिन यह डिफ़ॉल्ट व्यवहार है।


    html - My site width is wider then I need? -


    So I would be very happy if someone can help, but I'm just finishing my portfolio site and for some reason For when you have an additional 20 -30 pixels space on the browser right when you're on a phone or computer, it makes for an annoying scrolling experience

    I create my navigation bar Had used bootstrap for the rest but screw the rest Was coded f, and went to set my all width 100% so I'm confused about the fact that extra space why.

    If someone can take a look at my site and check the code, and I really appreciate it. My best estimate is that there is something in my navigation bar, but I do not understand why it is going beyond 100% width?

    Thanks

    You can enter some line from About the grid, remove , About the background and About me section or container-fluid to < Add more than code> line . Try it


    How do I print the last query executed in Yii php framework? -


    यह मेरा कोड है:

      $ ptoRequests = CalendarRequest :: मॉडल () - & gt (5, 7, 8, 8, 5, 5, 5, 5, 5, 5, 5, 2, 2) के साथ (सरणी ('अंतराल')) - & gt; खोजेंएली (ऐरे ('ऑर्डर' = & gt; 'टी। टाइम, टी.आई.डी.,' '' स्थिति '= & gt; 9, 10, 11) और स्थिति आईडी (1,2) और userId = "'$ user- & gt; userId।" "और (अंतराल.एंडडेट & gt; =: from)', 'params' = & gt; सरणी ( 'से' = & gt; तारीख ("Ymd")))); गूंज "& lt; पूर्व & gt;"; var_dump ($ ptoRequests- & gt; getQuery ()); गूंज "& lt; / pre & gt;"; बाहर जाएं();  

    मैं क्या हासिल करना चाहता हूं, अंतिम निष्पादित क्वेरी को प्रिंट करना है। GetQuery () फ़ंक्शन मुझे एक गंभीर त्रुटि देता है मुझे क्या करना चाहिए ? Thx

    इसे आज़माएं

      गूंज ModelClassName :: मॉडल () - & gt; getCommandBuilder () - & gt; CreateFindCommand ('table_name', $ मापदंड) - & gt; पाठ;  

    जहां $ मानदंड है

    <पूर्व> $ मापदंड = नया सीडीबीसीआरटीरिया (); $ मानदंड- & gt; शर्त = "आपकी क्वेरी स्थिति"; $ मापदंड- & gt; आदेश = "t.time desc"

    संदर्भ के लिए CDbCriteria जांचें


    xamarin - How to push notifications to iOS with Google Cloud Messaging -


    We have been able to send push notifications from GCM to Android, but I was thinking that I had the Apple Push Notification Service GCM with? Do I need to download some APIs on the client or is it supported on the backend? I am using Xamarin.Forms to develop priority.

    You must use APNS or third party content such as Pushshahar

    Take a look at the thread. Some configuration is required to enable push notifications in iOS. You need some certificate


    ruby on rails - ActiveAdmin nested form doesn't work -


    I am using ActiveAdmin in my Rail application. My setup is as follows:

    App / Model / Transaction_type RB

      Class translation type & lt; ActiveRecord :: Base has_many: accepts_nested_attributes_for translation_details: translation_details, allow_destroy: true end  

    application / models / translation_detail.rb

      Class Translation Dictate & lt; ActiveRecord :: Base is_to: translation_type attr_accessor: id ,: language_from ,: language_to ,: end value  

    app / admin / Anuwad_taipkarbi

    <[: id :, language_from :, language_to :, price: _destroy]> ActiveAdmin.register TranslationType permit_params work: translation_type, translation_details_attributes index column action: translation_type column: translation_details column: created_at column: updated_at action over Filters: translation_type filter: form made_at. F | F.inputs "translation details" do f.input: translation_type f.input: created_at f.input: updated_at end f.inputs do f.has_many: translation_details, allow_destroy: true do | Tran_det | Tran_det.input: language_from ,: collection = & gt; ['Gr', 'n', 'fr', 'd'] tran_det.input: language_to ,: archive = & gt; [ 'G', 'N', 'FR', 'D'] tran_det.input: Price finally ends Phle_filtr the f.actions end controller {@page_title =: translation_type} end < P> I do not need a section for translation_detail , so I ended up with app / admin / translation_detail.rb

    I have> translation_ship in my translate-type form Using the above code creates a nested form, but the attributes of translation_detail have not been saved after submitting. Also, when I try to update or delete translation_detail , then enter

      ID = *  for the typing type ID = 

    How can this be decided?

    It looks like this line

      attr_accessor: id,: Language_from,:  app / model / translation_digitation  was in error, in language_to:   

    , but I'm not really sure why.


    How to run inline script in Vagrant? -


    I'm new to Vendor and am trying to run an inline script as a document. My understanding is that when I vagrant ssh , I should see the production of inline execution. But I do not see it. Again, tried after vagrant reload , but there is no luck, is there something wrong here? Awara Version 1.7.2

      Vagrant.configure (2) do | Config | I tried another variation and failed  
     < Code> Traffic Configure (2) | Config | ... config.vm.provision "shell" do | S | S.inline: "echo I Ubuntu" End End  

    You need to run < To see the message, / p>

      vagrant provision  

    is to run only once when you launch a new VM for the first time And it will run the actions to setup the machine.


    swift - Calling private functions with NSTimer? -


    क्या एक तरीका है NSTimer कॉल निजी फ़ंक जब समय समाप्त हो गया है?

    (क्या यह भी समझ में आता है? NSTimer संदर्भ क्लास के लिए स्थानीय है, मुझे यकीन नहीं है कि रनटाइम पर कॉलर का लक्ष्य स्थानीय भी है।)

    हां, आपको फंक्शन @objc को चिन्हित करने की आवश्यकता है:

      @objc निजी फ़ंक्चर धावक (टाइमर: एनएसटीइमर) { 

    तब यह चयनकर्ता को जवाब देगा, लेकिन स्विफ्ट के लिए निजी होगा।


    asp.net - The ControlToValidate property of 'passwordCompare' cannot be blank -


    I am using duplication in my page that can be used to dynamically generate two text boxes. ; I have a comparison of a verifier.

    Now for this verifier, I am using ControlTovalidate & amp; ControlToCompare Both IDs will come from two text boxes which are dynamically generated.

    So when I force these text boxes to be done again, I am setting both properties of validation but error "ControlloAdvertisement's property 'can not be blank' compared to password."

      & asp: repeater id = "repeater" runat = "server" onitemdatabound = "boundproperty" & gt; & Lt; ItemTemplate & gt; & Lt; Asp: panel id = "panelProperty" runat = "server" cssclass = "prop" & gt; & Lt; Asp: textbox id = "textbox org" runat = "server" cssclass = "edit" view = "wrong" /> & Lt; / ASP: Panel & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: Repeater & gt; & Lt; Asp: comparevalidator id = "passwordCompare" runat = "server" controltovalidate = "" controltocompare = "" errormess = "comparison wizard" & gt; & Lt; / Asp: comparevalidator & gt;  


    Memory Error while using all_pairs_shortest_path in networkx in python -


    I have 8400+ nodes in my graph, for which I want to get the smallest path for all the pairs of all the nodes. I tried to use the network, resulting in a memory error.

      Traceback (most recent call final): File "C: \ user \ asif \ pythonworkspace \ formally \ src \ lastlast.py", line 19,  

    I have tried this mynewgraph = nx.all_pairs_shortest_path (myGraph) so far

    All my nodes have string data types and it has an engagement in every edge.

    Please provide your suggestions


    Pipelining POST requests with python-requests -


    Assume I can verify that a group of POST requests is actually logical Is, how am I setting up HTTP pipelining using python-request and forcing it to allow POST requests in the pipeline?

    Does anyone have an example job?

    For additional points, how to solve errors for excellent requests, if the pipeline suddenly breaks down?

    P.P.S. grequests is not an option in this case.

    request library.

    You can do pipelining using approximated grequests , which makes it easy to run many requests in parallel, but every parallel request still Use a new TCP connection.

    (The request connection does the connection, if the TCP connection is open, if the remote server permits this, but it only helps in sequential connection, and the request and response Is still optional).


    pandas - Absolute value for column in Python -


    How do I convert the values ​​of column 'count' to full value?

    My summary this dataframe:

      Date time count 2011-01-20 00:00:00 14.565 996 1 2011-01 -20 01:00:00 10.204177 2 2011-01-20 02:00:00 -1.261569 3 2011-01-20 03:00:00 1.938322 4 2011-01-20 04:00:00 1.938322 5 2011-01- 20 05:00 05:00 -5.963259 6 2011-01-20 06:00:00 73.711525  

    use.

    DF ['Count'] = DF [1] 'Count']. ABS () print (DF) count # 0 1 # 1 1 # 2 2 # 3 2 # 4 3 # 5 3

    click - javascript document onmousedown cancels element onclick -



    click - javascript document onmousedown cancels element onclick -

    i have document.addeventlistener('mousedown', ...) performing visual feedback user. have dynamicaly created elements elem.addeventlistener('click') not fired. if remove document mousedown listener clicks on elements triggered (or if alter document's mousedown click event). why , how solve this? realy need document handle mousedown , still able elements recieve click/tap events.

    fiddle: http://codepen.io/hpet/pen/izpjk if uncomment document mousedown event, element receives click ok, otherwise click on element never triggered.

    fiddle updated. uncomment lines 22/23 (setting position) not fire click event.

    the root cause of problem overlapping elements.

    since you're moving circle element on top of square element in mousedown handler, subsequent mouseup event triggered on circle. since event not triggered on square element, no click event generated.

    if have maintain circle element on top of square, can utilize pointer-events css rule forcefulness mouse events "go through" circle element.

    javascript click conflict mousedown

    java - pyramid numbers in alternative reverse order -



    java - pyramid numbers in alternative reverse order -

    i asked write code below structure:

    1 3 2 4 5 6 10 9 8 7 11 12 13 14 15

    and tried below code, works, yet i'm wondering if there improve approach this:

    public static void main(string[] args) { int no_of_rows=5; int c=0; for(int i=1;i<=no_of_rows;i++){ for(int k=i;k<no_of_rows;k++){ system.out.print(" "); } if(i%2!=0){ for(int j=0;j<i;j++){ c++; system.out.print(c +" "); } } else{ int a[] = new int [i+1]; for(int j=0;j<i;j++){ c++; a[j]=c; } for(int j=i-1;j>=0;j--){ system.out.print(a[j]+" "); } } system.out.println(""); } }

    is there improve implementation or doing right?

    i think improvement remove array in block:

    else{ int a[] = new int [i+1]; for(int j=0;j<i;j++){ c++; a[j]=c; } for(int j=i-1;j>=0;j--){ system.out.print(a[j]+" "); } }

    we can calculate values used in reverse order without need of additional array:

    c += i;//update c for(int j = 0; j < ; j++){ system.out.print((c - j) + " " ); }

    java

    c# - Animating elements in a ContentControl's DataTemplate -



    c# - Animating elements in a ContentControl's DataTemplate -

    i have contentcontrol i'm styling datatemplate. i'd able define animation outside of contentcontrol animates elements in datatemplate. xaml small, simplified illustration of scenario:

    <usercontrol x:class="storyboardtesting.stage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:ignorable="d"> <usercontrol.resources> <datatemplate x:key="mycontroltemplate"> <stackpanel> <textblock x:name="theblock1" text="foo!" /> <textblock x:name="theblock2" text="bar!" /> </stackpanel> </datatemplate> </usercontrol.resources> <visualstatemanager.visualstategroups> <visualstategroup name="valuestates"> <visualstate name="tostate"> <storyboard> <doubleanimation storyboard.targetname="mycontentcontrol" storyboard.targetproperty="(uielement.opacity)" duration="0:0:1" to="0" /> </storyboard> </visualstate> <visualstate name="fromstate" /> </visualstategroup> </visualstatemanager.visualstategroups> <grid> <canvas> <contentcontrol x:name="mycontentcontrol" contenttemplate="{staticresource mycontroltemplate}" /> </canvas> </grid> </usercontrol>

    i'd animation able target either textbox in template (instead of "mycontentcontrol"), either position or name. i'm starting animation in usercontrol's code-behind phone call this:

    visualstatemanager.gotoelementstate(this, "tostate", true);

    when run (replacing "mycontentcontrol" "theblock"), following:

    invalidoperationexception: 'theblock1' name cannot found in name scope of 'storyboardtesting.stage'.

    which makes sense. there way address either block using property names? need avoid codebehind since xaml beingness generated @ runtime.

    i'd highly suggest larn using blend when working on wpf projects. while xaml keyboard skills indeed useful, blend helpful. took me 5 minutes build next illustration you, it's datatemplate has states.

    (first created empty datatemplate, edited in blend)

    user can press of 2 buttons on bottom , current state changed.

    as you'll see below, behaviors proven helpful handling states, no code-behind @ all.

    xaml:

    <window x:class="wpfapplication3.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:wpfapplication3="clr-namespace:wpfapplication3" title="mainwindow" width="525" height="350"> <window.resources> <wpfapplication3:myobject x:key="myobject1" /> <datatemplate x:key="template1" datatype="wpfapplication3:myobject"> <grid> <grid.columndefinitions> <columndefinition /> <columndefinition /> </grid.columndefinitions> <grid.rowdefinitions> <rowdefinition height="37*" /> <rowdefinition height="13*" /> </grid.rowdefinitions> <visualstatemanager.visualstategroups> <visualstategroup x:name="visualstategroup"> <visualstate x:name="red"> <storyboard> <coloranimationusingkeyframes storyboard.targetname="button" storyboard.targetproperty="(panel.background).(solidcolorbrush.color)"> <easingcolorkeyframe keytime="0" value="red" /> </coloranimationusingkeyframes> </storyboard> </visualstate> <visualstate x:name="green"> <storyboard> <coloranimationusingkeyframes storyboard.targetname="button" storyboard.targetproperty="(panel.background).(solidcolorbrush.color)"> <easingcolorkeyframe keytime="0" value="lime" /> </coloranimationusingkeyframes> </storyboard> </visualstate> </visualstategroup> </visualstatemanager.visualstategroups> <button x:name="button" grid.rowspan="1" grid.columnspan="2" width="100" height="100" margin="2" content="button" fontsize="26.667" /> <button grid.row="1" width="auto" margin="2" content="state1"> <i:interaction.triggers> <i:eventtrigger eventname="click"> <ei:gotostateaction statename="red" /> </i:eventtrigger> </i:interaction.triggers> </button> <button grid.row="1" grid.column="1" width="auto" margin="2" content="state2"> <i:interaction.triggers> <i:eventtrigger eventname="click"> <ei:gotostateaction statename="green" /> </i:eventtrigger> </i:interaction.triggers> </button> </grid> </datatemplate> </window.resources> <grid> <contentcontrol content="{staticresource myobject1}" contenttemplate="{staticresource template1}" /> </grid> </window>

    code-behind:

    namespace wpfapplication3 { public partial class mainwindow { public mainwindow() { initializecomponent(); } } internal class myobject { public string category { get; set; } public int value { get; set; } } }

    edit

    to reply point of question, states belong datatemplate; defining these states outside of doesn't create sense , you've experienced not possible, , reason !

    imagine utilize template in 2 different places, share same state ? of course of study no, states have defined within it, not outside.

    c# wpf xaml animation

    ios - Reload TableView data from AppDelegate.m? -



    ios - Reload TableView data from AppDelegate.m? -

    i seek reload tableview appdelegate

    in appdelegate.m, in method in charge force notification, "didreceiveremotenotification" phone call uialertview everytime when notification arrives.

    uialertview *alertview = [[uialertview alloc] initwithtitle:@"notification received" message:[nsstring stringwithformat:@"%@", titlemsg] delegate:self cancelbuttontitle:@"ok" otherbuttontitles:nil, nil]; alertview.delegate = self; [alertview show];

    and when user click "ok" button, should reading of database , reload tableview

    // reload table when user click "ok" button in alert - (void)alertview:(uialertview *)alertview clickedbuttonatindex:(nsinteger)buttonindex { if ([alertview.title isequaltostring:@"notification received"]) { if (buttonindex == [alertview cancelbuttonindex]) { // stop sound notifications [self stopsoundfornotifications]; // refresh table messages accueilviewcontroller * avc = [[accueilviewcontroller alloc] init]; [avc readmsgsfromdb]; [avc reloadtablemsgsreceived]; [[nsnotificationcenter defaultcenter] postnotificationname:@"readmessagesfromdb" object:nil]; [[nsnotificationcenter defaultcenter] postnotificationname:@"reloaddatafromdelegate" object:nil]; } }

    }

    in header added protocol uialertviewdelegate

    do have ideas? thanks

    you set status on cancel button instead of set status on ok button - (void)alertview:(uialertview *)alertview clickedbuttonatindex:(nsinteger)buttonindex {

    if ([alertview.title isequaltostring:@"notification received"]) { if (buttonindex == [alertview okbuttonindex]) { // fire notification // stop sound notifications [self stopsoundfornotifications]; // refresh table messages accueilviewcontroller * avc = [[accueilviewcontroller alloc] init]; [avc readmsgsfromdb]; [avc reloadtablemsgsreceived]; [[nsnotificationcenter defaultcenter] postnotificationname:@"readmessagesfromdb" object:nil]; [[nsnotificationcenter defaultcenter] postnotificationname:@"reloaddatafromdelegate" object:nil]; } }

    ios objective-c xcode

    html5 canvas - Android drawing lines with arrows -



    html5 canvas - Android drawing lines with arrows -

    im learining java+android, , topic draw in canvas finger, android helped me lot allow users drawing lines. but, in app want add together head of arrow each line. tryed using path.lineto add together triangle, probleme can't rotate right direction.

    thinks help

    you have math. lets lastly point of line a, , lastly 1 b. have calculate direction vector d a-b. vector should normalized, ie divided own length, , stretched length want arrow head lines be. using androids pointf class a,b , d, should this:

    pointf = <initialize lastly point of line> pointf b = <initialize lastly 1 point of line> // difference vector pointf d = new pointf(a.x-b.x, a.y-b.y); // normalize d.set(d.x / d.length(), d.y / d.length()); // stretch to, say, 10 units d.set(10.0f * d.x, 10.0f * d.y);

    now rotation part. want rotate 3/4*pi, 1 time clockwise , 1 time counterclockwise. can using rotation matrix. 2-dimensional case, quite simple:

    float angle = 0.75f * math.pi; pointf dleft = new pointf(+d.x*math.cos(-angle)-d.y*math.sin(-angle),+d.x*math.sin(-angle)+d.y*math.cos(-angle)); pointf dright = new pointf(+d.x*math.cos(+angle)-d.y*math.sin(+angle),+d.x*math.sin(+angle)+d.y*math.cos(+angle));

    note dleft , dright direction vectors. calculate 2 ending points of arrow lines, have add together these a. in pseudo-(non-java)-code do:

    moveto(a); lineto(a+dleft); moveto(a); lineto(a+dright);

    hope work; luck!

    android html5-canvas drawing

    How to install ctag on a computer with no admin rights? -



    How to install ctag on a computer with no admin rights? -

    i have scientific linux 6 machine in office not have admin rights work from. utilize ctags using vim there. how can install if not have admin rights? there similar utilize or maybe plugin?

    cheers, alex.

    ctags

    iOS 8: get resource from Cocoa Touch Framework -



    iOS 8: get resource from Cocoa Touch Framework -

    to share code , resources between app , extensions, embed cocoa touch framework in project, framework contains resources image , xib files.

    my question is: how access resources may main app , extensions?

    i used utilize method: ios 8 extension: how utilize xib within cocoa touch framework in extensions?

    but make re-create resources in app's bundle , extensions' bundle, not repeat.

    is there improve way?

    update:

    now main app can utilize code access resource in frameworks:

    +(nsbundle*)frameworkbundle { nsstring *frameworkdirpath = [[nsbundle mainbundle] privateframeworkspath]; nsstring *frameworkbundlepath = [frameworkdirpath stringbyappendingpathcomponent:@"myframework.framework"]; nsbundle *frameworkbundle = [nsbundle bundlewithpath:frameworkbundlepath]; homecoming frameworkbundle; }

    but doesn't work extensions.

    try this:

    nsbundle *frameworkbundle = [nsbundle bundleforclass:[anyclassfromframework class]];

    ios cocoa-touch ios8

    c# - IEqualityComparer using list of string as comparer -



    c# - IEqualityComparer using list of string as comparer -

    i'm attempting setup iequalitycomparer uses list of string comparing property.

    when using except , intersect in 2 lines of code below, records seen 'new' , none recognized 'old'.

    list<exclusionrecordlite> newrecords = currentrecords.except(historicalrecords, new exclusionrecordlitecomparer()).tolist(); list<exclusionrecordlite> oldrecords = currentrecords.intersect(historicalrecords, new exclusionrecordlitecomparer()).tolist();

    this iequalitycomparer class (words list)

    public class recordcomparer : iequalitycomparer<record> { public bool equals(record x, record y) { if (object.referenceequals(x, y)) homecoming true; if (x == null || y == null) homecoming false; homecoming x.words.sequenceequal(y.words); } public int gethashcode(record obj) { homecoming new { obj.words }.gethashcode(); } }

    your gethashcode incorrect. utilize 1 this:

    public override int gethashcode() { if(words == null) homecoming 0; unchecked { int hash = 19; foreach (var word in words) { hash = hash * 31 + (word == null ? 0 : word.gethashcode()); } homecoming hash; } }

    to reply why collection not override gethashcode uses object.gethashcode returns unique value: why c# not implement gethashcode collections?

    c# iequalitycomparer

    java - Toggle between a RadioGroup of Toggle Buttons -



    java - Toggle between a RadioGroup of Toggle Buttons -

    so, have buttons lined below:

    here's image of i'm trying achieve:

    in image, first row row of buttons no button pressed. in sec row, first button pressed. in 3rd row, clicked on 4 , 4th button pressed (not first 1 anymore).

    <radiogroup android:id="@+id/togglegroup" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" android:usedefaultmargins="true" android:layout_column="0" android:columncount="4" android:rowcount="1" android:orientation="horizontal" > <togglebutton android:id="@+id/number_zero" android:layout_width="34sp" android:layout_height="40sp" android:texton="@string/number_zero" android:textoff="@string/number_zero" android:onclick="ontoggle" android:checked="true" android:background="@drawable/psc_number_color" android:layout_margin="5sp" /> <togglebutton android:id="@+id/number_one" android:layout_width="34sp" android:layout_height="40sp" android:texton="@string/number_one" android:textoff="@string/number_one" android:onclick="ontoggle" android:checked="true" android:background="@drawable/psc_number_color" android:layout_margin="5sp" /> <togglebutton android:id="@+id/number_two" android:layout_width="34sp" android:layout_height="40sp" android:texton="@string/number_two" android:textoff="@string/number_two" android:background="@drawable/psc_number_color" android:layout_margin="5sp" /> </radiogroup>

    i wondering if possible toggle between these 5 buttons in such way if pressed 1 down, button remain pressed. if click on button in group, button clicked on before depress , new button clicked on pressed down.

    trying within pageradapter:

    public void ontoggle(view view) { ((radiogroup)view.getparent()).check(view.getid()); // app specific stuff .. } public object instantiateitem(viewgroup parent, int position) { 1 = (togglebutton) view.findviewbyid(r.id.number_one); 2 = (togglebutton) view.findviewbyid(r.id.number_two); 3 = (togglebutton) view.findviewbyid(r.id.number_three); 4 = (togglebutton) view.findviewbyid(r.id.number_four); final radiogroup.oncheckedchangelistener togglelistener = new radiogroup.oncheckedchangelistener() { @override public void oncheckedchanged(final radiogroup radiogroup, final int i) { (int j = 0; j < radiogroup.getchildcount(); j++) { final togglebutton view = (togglebutton) radiogroup.getchildat(j); view.setchecked(view.getid() == i); } } }; one.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { one.toggle(); } }); ((radiogroup) view.findviewbyid(r.id.togglegroup)).setoncheckedchangelistener(togglelistener); }

    try this: have done same things checkbox [ custom checkbox ].

    @override public void onclick(view view) { checkbox cb = (checkbox) view; if(cb.ischecked()){ linearlayout lllayout = (linearlayout) cb.getparent(); for(int i=0; i<((viewgroup)lllayout).getchildcount(); ++i) { view nextchild = ((viewgroup)lllayout).getchildat(i); if(nextchild instanceof checkbox && nextchild.getid()==cb.getid() ){ }else if (nextchild instanceof checkbox && nextchild.getid()!=cb.getid() ){ checkbox cb2=(checkbox) nextchild; cb2.setchecked(false); } } } else{ linearlayout lllayout = (linearlayout) cb.getparent(); for(int i=0; i<((viewgroup)lllayout).getchildcount(); ++i) { view nextchild = ((viewgroup)lllayout).getchildat(i); if(nextchild instanceof checkbox && nextchild.getid()==cb.getid() ){ checkbox cb2=(checkbox) nextchild; cb2.setchecked(false); }else if (nextchild instanceof checkbox && nextchild.getid()!=cb.getid() ){ checkbox cb2=(checkbox) nextchild; cb2.setchecked(false); } } } }

    my xml:

    <linearlayout android:id="@+id/llshift" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="4" android:gravity="right" android:orientation="horizontal" > <checkbox android:id="@+id/cbmorning" android:layout_width="wrap_content" android:layout_height="wrap_content" android:button="@drawable/custom_radio_button_morning" android:paddingbottom="5dp" android:paddingright="3dp" android:paddingtop="5dp" /> <checkbox android:id="@+id/cbevning" android:layout_width="wrap_content" android:layout_height="wrap_content" android:button="@drawable/custom_radio_button_evening" android:paddingbottom="5dp" android:paddingright="5dp" android:paddingtop="5dp" /> </linearlayout>

    custom_radio_button_morning.xml

    <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/morning_chk" android:state_checked="true"/> <item android:drawable="@drawable/morning_unchk" android:state_checked="false"/> </selector>

    java android button toggle

    adb doesn't see device online, android studio does -



    adb doesn't see device online, android studio does -

    i have opposite of problem: android studio doesn't see device

    android studio sees device , can deploy to/ run on device no problem.

    but i'm trying utilize apache cordova , cannot see device online command line.

    adb devices

    shows device number, , "offline".

    i've tried of recommended steps here http://stackoverflow.com/a/9966660/210757

    any suggestions?

    android adb

    c# - How to clone part of a List? -



    c# - How to clone part of a List? -

    is possible clone part of list<t>?

    example:

    list<string> myoriginalstring = new list<string>(); myoriginalstring.add("tyrannosaurus"); myoriginalstring.add("amargasaurus"); myoriginalstring.add("mamenchisaurus");

    i want clone myoriginalstring list index 1 index 2.

    is possible? changes in sec list<string> should reflected in first , vice-versa.

    update

    thanks answers far. seems didn't express myself correctly.

    actually don't want re-create or clone. need create new list (which part of original one); , when alter (some value) in new list, original should changed same way. (the lists should identical time, new list part of original).

    hopefully clearer.

    you can create listslice<t> class represents piece of existing list. piece behave read-only list , because keeps reference original list not supposed add together or remove elements in original list. cannot enforced unless implement own list not here.

    you have implement entire ilist<t> interface including ienumerator<t> need enumerating slice. here example:

    class listslice<t> : ilist<t> { readonly ilist<t> list; readonly int32 startindex; readonly int32 length; public listslice(ilist<t> list, int32 startindex, int32 length) { if (list == null) throw new argumentnullexception("list"); if (!(0 <= startindex && startindex < list.count)) throw new argumentexception("startindex"); if (!(0 <= length && length <= list.count - startindex)) throw new argumentexception("length"); this.list = list; this.startindex = startindex; this.length = length; } public t this[int32 index] { { if (!(0 <= index && index < this.length)) throw new argumentoutofrangeexception(); homecoming this.list[this.startindex + index]; } set { if (!(0 <= index && index < this.length)) throw new argumentoutofrangeexception(); this.list[this.startindex + index] = value; } } public int32 indexof(t item) { var index = this.list.indexof(item); homecoming index == -1 || index >= this.startindex + this.length ? -1 : index - this.startindex; } public void insert(int32 index, t item) { throw new notsupportedexception(); } public void removeat(int32 index) { throw new notsupportedexception(); } public int32 count { { homecoming this.length; } } public boolean isreadonly { { homecoming true; } } public void add(t item) { throw new notsupportedexception(); } public void clear() { throw new notsupportedexception(); } public boolean contains(t item) { homecoming indexof(item) != -1; } public void copyto(t[] array, int32 arrayindex) { (var = this.startindex; < this.length; += 1) array[i + arrayindex] = this.list[i]; } public boolean remove(t item) { throw new notsupportedexception(); } public ienumerator<t> getenumerator() { homecoming new enumerator(this.list, this.startindex, this.length); } ienumerator ienumerable.getenumerator() { homecoming getenumerator(); } class enumerator : ienumerator<t> { readonly ilist<t> list; readonly int32 startindex; readonly int32 length; int32 index; t current; public enumerator(ilist<t> list, int32 startindex, int32 length) { this.list = list; this.startindex = startindex; this.length = length; } public t current { { homecoming this.current; } } object ienumerator.current { { if (this.index == 0 || this.index == this.length + 1) throw new invalidoperationexception(); homecoming current; } } public boolean movenext() { if (this.index < this.length) { this.current = this.list[this.index + this.startindex]; this.index += 1; homecoming true; } this.current = default(t); homecoming false; } public void reset() { this.index = 0; this.current = default(t); } public void dispose() { } } }

    you can write extension method create easier work slices:

    static class listextensions { public static listslice<t> slice<t>(this ilist<t> list, int32 startindex, int32 length) { homecoming new listslice<t>(list, startindex, length); } }

    to utilize piece can write code this:

    var list = new list<string> { "tyrannosaurus", "amargasaurus", "mamenchisaurus" }; var piece = list.slice(1, 2); slice[0] = "stegosaurus";

    now list[1] slice[0] contains "stegosaurus".

    c# .net list clone

    mysql - SQL select order by date in varchar -



    mysql - SQL select order by date in varchar -

    i have date in database in varchar column , can't alter it. want sort things newest latest. date in database looks like:

    2014-09-22 10:28:28

    so seek like:

    $sql = "select * axnmrs_cases vin = :vin order str_to_date(date_created,'%b-%e-%y') asc limit 30";

    but unfortunately not alter me , if alter asc desc , nil changeing in result

    and like:

    $sql = "select * axnmrs_cases vin = :vin order convert(date_created, date, 103)";

    this throw syntax sql error , have no thought why.

    is here can show me right way?

    date stored in varchar not real date , hence order not give want. best approach store date in mysql native info types. in case can utilize str_to_date() function convert varchar dates real date , utilize sort as

    order str_to_date(date_created,'%y-%m-%d %h:%i:%s');

    mysql sql

    django url encode issue in using mathjax -



    django url encode issue in using mathjax -

    i wanna add together mathjax script template </script> <script type="text/javascript" src="{% static "mathjax-2.4-latest/mathjax.js?config=tex-ams_html-full.js" %}"></script>

    but django encode '?' '%3f' , '=' '%3d'(in firefox console), wrong url. if utilize "http://cdn.mathjax.org/mathjax/latest/mathjax.js?config=tex-ams-mml_htmlormml" "src" attribution value, it's correct. , firefix console can show '?' , '=' correctly.

    okay, solved problem myself. should place "?config=xxx" out of "%}". looks like

    <script type="text/javascript" src="{% static "mathjax-2.4-latest/mathjax.js" %}?config=tex-ams_html-full"> </script>

    django encode mathjax

    ios - Change the image of a specific cell inside a UICollectionView -



    ios - Change the image of a specific cell inside a UICollectionView -

    i have 5x5 grid of cells in uicollectionview, each image set this:

    - (uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath { collectionviewcell *cell = (collectionviewcell *)[collectionview dequeuereusablecellwithreuseidentifier:@"circlecell" forindexpath:indexpath]; imagearray = [[nsmutablearray alloc]init]; (int i=1; i<=12; i++) { uiimage *imagetoadd = [uiimage imagenamed:[nsstring stringwithformat:@"%i", i]]; [imagearray addobject:imagetoadd]; } self.cellimageview = [[uiimageview alloc] initwithframe:[self getcirclesize]]; int = arc4random() % 12; [self.cellimageview setimage:[imagearray objectatindex:i]]; [cell addsubview:self.cellimageview]; cell.tag = i; homecoming cell; }

    each image circle of random color - 1.png 12.png. detecting taps on specific cell, , getting it's color , position in collection view:

    uicollectionviewcell *cell = [collectionview cellforitematindexpath:indexpath]; nsindexpath *indexpath = [collectionview indexpathforcell:cell]; self.firstcirclesection = indexpath.section; self.firstcirclerow = indexpath.row; self.firstcircleindex = (indexpath.section * 5) + (indexpath.row + 1); self.firstcirclenum = (int)cell.tag; //i have dictionary colors , keys, e.g 1 yellow, 2 blue, 3 red. line gets color: nsstring *dotcolor = [nsstring stringwithformat:@"colour: %@", [self.colordict objectforkey:[nsstring stringwithformat:@"%ld", self.firstcirclenum]]];

    then sec circle tap of circle, calculating new color of each circle (a color in middle of 2 selected colors):

    uicollectionviewcell *cell = [collectionview cellforitematindexpath:indexpath]; nsindexpath *indexpath = [collectionview indexpathforcell:cell]; self.secondcirclesection = indexpath.section; self.secondcirclerow = indexpath.row; self.secondcircleindex = (indexpath.section * 5) + (indexpath.row + 1); self.secondcirclenum = (int)cell.tag; nsstring *circlecolor = [nsstring stringwithformat:@"colour: %@", [self.colordict objectforkey:[nsstring stringwithformat:@"%ld", self.secondcirclenum]]]; nsinteger = (self.firstcirclenum + self.secondcirclenum)/2; nsstring *dotcolor = [nsstring stringwithformat:@"colour: %@", [self.colordict objectforkey:[nsstring stringwithformat:@"%ld", i]]]; // labels on view showing colors mix colorlabel2.text = circlecolor; positionlabel2.text = [nsstring stringwithformat: @"position: %ld", self.secondcircleindex]; mixedcolorlabel.text = [nsstring stringwithformat:@"new %@", dotcolor]; nsindexpath *indexpath2 = [nsindexpath indexpathforrow:self.firstcirclerow insection:self.firstcirclesection]; nsinteger thefirstcircleindex = (indexpath2.section * 5) + (indexpath2.row + 1); nsindexpath *indexpath3 = [nsindexpath indexpathforrow:self.secondcirclerow insection:self.secondcirclesection]; nsinteger thesecondcircleindex = (indexpath3.section * 5) + (indexpath3.row + 1); // reference 2 cells uicollectionviewcell *firstcircle = [collectionview dequeuereusablecellwithreuseidentifier:@"circlecell" forindexpath:indexpath2]; uicollectionviewcell *secondcircle = [collectionview dequeuereusablecellwithreuseidentifier:@"circlecell" forindexpath:indexpath3];

    my question is, 1 time have done this, how can alter image of 2 cells - firstcircle , secondcircle? have property on custom collectionviewcell, cellimage, unable access with: firstcircle.cellimage. want alter image on both cells.

    in cellforitematindexpath: method, creating new uiimageview, setting image array, , adding subview of cell. different cellimage property of cell. prepare this:

    either: if have configured custom collectionviewcell in storyboard (i.e. added image view prototype cell, , hooked collectionviewcell's cellimage outlet), needn't add together uiimageview can use:

    cell.cellimage.image = [imagearray objectatindex:i];

    or: if it's not configured in storyboard (or collectionviewcell initialiser), maintain existing code, set cell.cellimage point imageview created:

    cell.cellimage = self.cellimageview;

    next: in other code (which assume in didselectitematindexpath?), next line tells compiler cells of base of operations uicollectionviewcell class:

    uicollectionviewcell *cell = [collectionview cellforitematindexpath:indexpath];

    but want compiler know these cells custom collectionviewcell class. amend line to:

    collectionviewcell *cell = (collectionviewcell *)[collectionview cellforitematindexpath:indexpath];

    (and elsewhere). done, compiler should allow utilize cellimage property without problem.

    now, reference cells indexpath2 , indexpath3, don't utilize dequeuereusablecellwithidentifier: method, utilize cellforitematindexpath: (just in first line):

    collectionviewcell *firstcircle = [collectionview cellforitematindexpath:indexpath2]; collectionviewcell *secondcircle = [collectionview cellforitematindexpath:indexpath3];

    you can manipulate images firstcircle.cellimage.image etc.

    also, there redundancy in code: these lines:

    uicollectionviewcell *cell = [collectionview cellforitematindexpath:indexpath]; nsindexpath *indexpath = [collectionview indexpathforcell:cell];

    you getting cell given indexpath, , getting indexpath cell - same. can delete sec of these lines. also, in code handles secondcircle, indexpath3 same indexpath, , secondcircle cell set @ start of code. use:

    collectionviewcell *secondcircle = cell;

    finally, cellforitematindexpath loads imagearray every time called - unnecessary. utilize different method load these images - perhaps viewdidload method.

    ios objective-c xcode uicollectionview