Posts

Showing posts from June, 2013

android - Call OnResume when Back Button Pressed when using Fragments -

I add the first piece like this Fragment Manager FM = Slider Activity. .getSupportFragmentManager (); Fragment Transaction Feet = FM BBT transactions (); Piece piece = faucet; Piece = new homefragment (); Ft.add (R.id.content_fragment, piece, "home"); Ft.addToBackStack ("home"); Ft.commit (); and another piece Fragment Manager FM = Slider Activity. This .getSupportFragmentManager (); Fragment Transaction Feet = FM BBT transactions (); Piece piece = faucet; Piece = new homefragment (); Ft.add (R.id.content_fragment, piece, "About"); Ft.addToBackStack ("About"); Ft.commit (); My question is, how do I call a method of homeframement (first) if I press the back button from afraagment (seconds) onResume ( ) Is not a problem that is causing the problem I reply late I am posting, but I think this will be useful to others. Unless we are using piece code from junk () , onResume Call (s) to source Destination piece at () ...

mysql - to select and insert from one table to another -

In the master table, I have been named two names like 'id -> etiquette, primary key', 'designation -> varchar'; And in the registration form designation, one thing is in the drop down menu and as the process of coding, dynamic media enrollment details appear on the web browser by obtaining information from the database. Please help me in the code for passing further information in the selection to be defined as in the first paragraph.

angularjs - Get angular constants in Karma -

ऐप स्टार्टअप को देखते हुए: कोणीय। मॉड्यूल ("स्टार्टर", ["आयनिक "])। कॉन्स्टेंट (" डेब्यूग ", सच) .रन (फ़ंक्शन () {/ * ... * /}); मैं DEBUG के मूल्य का परीक्षण कैसे करूँगा? इसके साथ प्रयास करते समय: वर्णन ( "एप" (कार्य () (पहले) (समारोह () (मॉड्यूल ("स्टार्टर");}) ("स्थिरांक", फ़ंक्शन () (वर्णन करें ("डेब्यूग", इंजेक्शन (फ़ंक्शन (DEBUG) {यह (" एक बूलीयन होना चाहिए ", फ़ंक्शन () {उम्मीद (प्रकार का DEBUG)। टीबीई (" बूलियन ");})}}));});}); मैं बस मिल typeError: 'शून्य' एक काम नहीं है ('current.Spec मूल्यांकन $ मॉड्यूल') workFn पर (/ %%% / Www / lib / angular-mocks / angular-mocks.js: 2230) पर / %%/www/js/app_test.js14 पर /%%%/www/js/app_test.js15 पर / %% % / Www / js / app_test.js: 16 सुनिश्चित करें कि इसे तत्काल किया जा रहा है सही जगह में। इस स्थिति में, मॉड्यूल को लोड करने के लिए पहले नहीं चलाया जा रहा था, क्योंकि debug होता था इंजेक्शन () ed में व...

SQL Join on 2 Tables -

I am trying to create this query. Hopefully someone can help me have 2 tables 1 in the table code | Name | Price | Term 1 Name 1 1 2010 2 Name 2 2 2010 Table 2 contains code | Name | 1 Name 1 2 Name 2 3 Name 3 4 Name 4 What do I want to show 1 name 1 1 2 Name 2 2 3 Name 3 4 4 Name 4 0 In some examples Table 2 can have a value for all the names in the table, but where there are only 1,2,3 names, I call it each other I want to display but with value of 0 or empty Try it: Select T2. *, Isnull as code (T1code, 0) - or leave table 2 to the left to the left External T1 on T1.name = T2.name You isnull (T1 ) Can be changed as code, 0) as the code with isnull (T1.value, 0) value . I'm not sure what you're doing ...

facebook - How to get taggable friends list in c# windows 8 phone app? -

I want to get to the friendly list # c # windows 8 phone app I sent this link but I only find those friends I have been using my app, how can I get a tagable friend list? This is tagable with friends, with example code. That friendpunker probably does not use taggable_breads , but user friend with / me / friends endpoint returns it back to one such friends Which also authorizes your app since April 2014. Check the changelog for more information:

c - no update of parameters using multirootsolver -

I am currently trying to write a code to solve a non linear system of equations. I am using the functions of the GSL library, especially multiroot_fdf_solver. My problem is that it does not want to be united in the present more specifically, I have the following behaviors: - If my initial conditions are close to the result, then the GSL_multitrut_fdf_solver_acare parameter does not update at all is. I tried to show results in different stages, and I have all parameters dx = NaN (I think it is quite a credit), the status of "gsl_multiroot_fdf_solver_iterate" is "status" and the condition of gsl_multiroot_test_residual is "Running yet " - Parameters are updated only if my initial conditions are far away from the expected result. In this case, the conviction does not focus on the correct values. I've already checked the expression of my function and my Jacobian several times, and they look good. I am right that my jackaban (and also as my syst...

ios - Show and hide UITableView with animation -

I am trying to show and hide a table view with an animation "transition from left to right and left" P> This is what I was already tired, but after using random values ​​in CGRactMac, Anyone can help me fix it - (zero) display: (UITableView *) tableview: (UIView *) see {tableView.alpha = 1; [UIView animated disk: 0.35 animation: ^ {tableView.frame = CGRectMake (-20 9, 440, 180, 209); } Closing: ^ (BOOL Finish) {{tableView setHidden: Yes]; }]; } - Hide (zero): (UITableView *) TableView: (UIView *) View: (int) TB {tableView.alpha = 1; [TableViewSet: No]; [UIView Animative Withdrawn: .45 Animation: ^ {tableView.frame = CGRectMake (3, 442, 180, 209); }]; } You can use this code: [Code] [UIView transitionFromView: firstView toView: secondView // table view duration: 0.5 options: UIViewAnimationOptionTransitionFlipFromLeft termination: ^ (BOOL end) {[firstView.superView addSubview: secondView]; [FirstView.SuperViewSubview: First view]; }];

Docker: input from web UI user to Docker run Python interpreter -

I am trying to create a web application which automatically grants the Python code given by programming students. I have planned to interpret the code as a means of sandboxing in the Docker instance, but now I have a problem what if a student writes the input ("...") in his code? This will leave the python interpreter inside the dock waiting for additional input. If it does not end in a while, then the Doker container will be killed eventually, but I really want to offer Oppurtunity for the students to give input to their programs. I know that I can start a doc in interactive mode, but then the problem is: How can I dock my web sites to know that the web UI user should be prompted for input ? You might want to see this project if you have a real bash (or other shell, ipathon?) Sign Where they can quickly communicate with the convenience of their web browser. There are several prefabricated dockfiles to go as an example:

ruby - How write only once path_names on routes and make available for all of routes in Rails 4.1? -

I want to translate my path_names only once, and it is available in all the routes for routes.rb Gets . This is my routes.rb now: PATH_NAMES = {new: 'Novo', edit: 'editar', show: 'Wer'} Rails.application.routes.draw do devise_for: user, controller: {omniauth_callbacks: 'omniauth_callbacks', registration: 'registration'} resource: movements, path: path = & gt; 'Fluxo-d-casa', path_name: PATH_NAMES resource: movement categories ,: path = & gt; '/ Fluxo-de-caixa / categorias', path_name: PATH_NAMES resource: installments, path = & gt; 'Parcel', path_name: PATH_NAMES resource: contract, path = & gt; 'Contratos', path_name: PATH_NAMES resource: accounts, path = & gt; 'Contas', path_name: PATH_NAMES resource: event,: path = & gt; 'Eventos', path_name: PATH_NAMES resource: user,: path = & gt; 'Usuarios', path_name: PATH_NAMES resource: viewer,: path = & g...

android - Unable to swipe down when spinners included -

Text after " Uses the layout given to my Android app (see About 7 more AutoCompleteTextViews and 5 more spinners) But I am not able to swipe the screen, whether the problem is connected in some way or is there more chance with the activity? Any help would be great since I'm stuck here & lt; RelativeLayout xmlns:. Android = "http://schemas.android.com/apk/res/android" xmlns: device = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: paddingTop = "@ Dimen / activity_vertical_margin" tool: reference: Android: paddingBottom = "@ Dimen / activity_vertical_margin" Android: paddingLeft = "@ Dimen / activity_horizontal_margin" Android: paddingRight = "@ Dimen / activity_horizontal_margin" Android: paddingTop = = "ComkexamplekmegkmyapplicationkActivity" android: gravity = "Center_horizontal" Android: weig...

subquery - SQL - How to subtract / add two or more sub queries (looking for a more proficient way) -

I already know how to perform subtraction / addition either on two subqueries and then the result is a new column In the form, we have copied subqueries and placing them into brackets. (Select IIF (BL.value1) Table 1 T1 INNER from Table 2 T2 ON T1.ID = T2.Table1ID where T2 .ID = TableMain.ID) - --- & Lt; Join subtraction (SELECT SUM (T5.Value2) from Table4 T4 to INNER Table6 T6 ON T4.ID = T6.Table4ID T6.ID = T7.Table6ID at INNER T6 ON as far as T7.FIeld IN (40))) [Net invoice value] I would like to know whether this is the only easy way to use aliases? Thanks in advance

objective c - Replacing nulls with empty string from JSON response not working in iOS -

I have used code below to replace nulls with json feedback with empty string, but it is not working . Please help me to fix this problem, I'm disabling of many scenarios and server response in app crash. code: - (NSMutableDictionary *) recursive: (NSMutableDictionary *) dictionary attachment {NSMutableDictionary * dictionary = [[NSMUTABLEXAd ALLOC] initWithDictionary: dictionaryRespens]; ({Dictionary allKeys] in NSString * key {id nullString = [dictionary objectForKey: key]; If ([nullString isKindOfClass: [nsiteware class]]) {[self-recursive: (NSMutableDictionary * nullString]; } And if ([nullString isKindOfClass: [NSArray class]]) {for (int i = 0; i Try this: - ( NSMutableDictionary *) Recursive tap revoke: (NSMutableDictionary *) Dictionary Reset {NSMutableDictionary * Dictionary = [dictionary resuscitationable changeable coop]; NSString * nullString = @ ""; ({Dictionary allKeys] in NSString * key {id value = dictionary [key]; If ([value iskindoffclass...

node.js - Why doesn't forever restart node process if i kill it -

I have always installed Ubuntu 14.04 with commands in ec2 example sudo npm always Always list / p> If I am using that process by using the kill 8673 command does not always restart the node server but according to that blog post it restart the server Why does this happen and how to continuously run the node server forever ?? Any kind of help is appreciated.

android - Continuous recording in smallest file size. AudioRecord or MediaRecorder? -

I'm developing an Android application. In this app, 2 user sends one to talk to each other first user side, audio record of the app records and files recorded on the server you use. On the other hand, the app will download these files and play them using audiotrack. This process is continuous; Which means that I'm recording and sending, while the user is still talking. Everything is working fine, but there is a problem in the size of the files to upload, I found no way to control the size of the recorded files. The whole problem can be solved if I can find audioRecord in a way to use for example. setAudioSamplingRate (low), set lowAudioEncodingBitRate (low), setOutputFormat (OutputFormat.THREE_GPP), setAudioEncoder (MediaRecorder.AudioEncoder.AMR_NB) I can know that we use these with MediaRecorder, but I To use AudioRecord because I want to analyze the sound before sending it Here, we have 2 things:. i) or can be MediaRecorder (but instead AudioRecord to use we would lo...

Vim shows file name as title -

My Vim window displays the file name at the top of the terminal window. I can not find a configuration related to that in my vimrc file to disable it. Yes, you can set , title option. Code>: h 'title'

Use android adb shell to return one activity -

I have the following problem: Our company has built an Android device that has no return There is no button (not physical and not under the screen), so I can not return to the previous activity / screen. Now I need to test the app developed by a third-party, when I return to the previous screen. Settings Either way I can return to the previous screen or the user can click on the return button? I had to go back to HOME (Android main screen): ADB shell is starting- A androidintent. Action. Mn-c androidintent Category.HOME Also read about Activity Manager and Expirer Monkey at these links: But This is not able to solve my problem. How can anyone complete this call through ADB? You can try: ADB Shell input keywidth keycode_back

image - Lync for Mac 2011 does not show profile pictures / avatars -

Image
I'm using MS Lynch for Mac version 14.0.10. Is it not possible to see me or Sahgal avatar / profile pictures? Other Mac users in the company are not the same issue affecting Windows users. I have already been asked about this problem by someone but without any solutions Depending on its infrastructure, user photos are stored in either Active Directory (Thumbnail Photo) or Exchange . Links on Windows integrates with Outlook to pull this information. If you are a full-OOI 565 user, then I think you should look see the picture I believe I'm not familiar with the office: Mac In addition, your picture can be deposited anywhere on the intranet /. Photo location can be restricted to CsClientPolicy

ios - Update super view size on setting of UIButton image? -

My buttons are obstacles for example: (4, 4, 4, 12) . I want to set my image (image and button size are the same) and want to change its size to a certain extent, Rect. For example: CGRectMake (0, 0, 100, 200) . Therefore the image must be rejected proportionally, but should be less than this reset. And of course I should resize the size of the button and the scene in which this button is. How to solve this problem? I know how to do it without any interruption and it is quite easy, but my project is needed. Try to set the image property of the button. UIImage * btnImage = [UIImage imageNamed: @ "image.png"]; [BTNTO set image: BTnImage for state: UIContolstadt normal]; Then you only worry about the button.

c# - Match TextBox(es) with Labels -

At runtime, I am interrogating an access table and storing results in an array. So for example, the data structure of that access table is Sales Specialname ------ Item 1 Soled ----- Item 2 Soled --------- - Item 3 Sold Mitch Boat Camera Jason Car Shells Mitch Eggs Richard Coffee Bacon Beans I want to create a label that is SalespersonName & amp; Make a text box next to the Salesperson name that will show all the blank items the netted field. Then my desired output will be (label) Mitch (text box) boat (text box) camera (label) Jason (text box) car (text box) shells (label) mitch (text box ) Egg (label) Richard (text box) Coffee (text box) Bacon (TATB) bean I do not understand that the price is not empty only if the value is zero. I am only able to do this for all or something which I am not after that. Code to add everything below string path = "A: \\ Database1 .mdb"; Object oName = path; System.Collections.Hashtable Lookup = New System compilation. ...

c - how to get client machine mac address using PPAPI plugin or PNACL -

I have to get client machine MAC address so that users can not log in from other computers. I am new to PPAPI and have tried to code down in C to get MAC address. It is not included in the PPAPI lib that require conio.h header file I added externally to the file but not help any idea {/ * Copyright (c ) 2013 Chromium Writer All Rights Reserved. * This source code is used by BSD-style licenses which can be found in the * license file. Include * / # & lt; Stdio.h & gt; #include & lt; String.h & gt; # Include & lt; Stdlib.h & gt; #include "ppapi_simple / ps_main.h" #ifdef SEL_LDR #define example_main main #endif int example_main (int argc, char * argv []) {/ * Javascript to use ppb_messaging to send "Hello World". * / File * FP; Printf ("System First Hello. \ N"); System ("ipconfig / all> gt: //macid.txt"); Printf ("Hello. \ N" before opening the file); fp = fopen ( 'D: //macid.txt "," r ...

vb.net - Kill current application bypassing close events -

Is there an easy way to kill an application running without firewalling any registered form or application? Something like choosing the process in the task manager and killing it there? I know this is not a "clean" way, and I know that you should use the system. Windows.form. Exit the app () or me.Close , but in this case I really need to do it "dirty" way! The only thing I can think of is to take the name of the process of my application and use it to use System.Diagnostics.Process and kill it. . But this is the easiest way that would be good. found this, process is a function to obtain the current process. Slow process in the form of a system. Diagnostics Process = process. Get Current Process Process Kill ()

python - (8)Exec format error: exec of ' ' failed - CentOS -

I am using a CentOS VM from backspace with the installed lamp. I have a dragon script that I want to run with CGI-bin. I've browsed the path on my browser and I get a 500 server error. Insured, this is the first time I have ever used the python and CentOS, but I understand very well. But I actually found this error I get this error: [Tuesday, November 04, 2014 12:46:07 2014] [Error] [customer 86.2.110.133] (8) Exec format error : '/ var / www executive / cgi-bin / payment test.cgi' fail [Tue Nov 04 12:46:07 2014] [error] [client 86.2.110.133] script premature header end: pay Test.cgi print # 3 stripe Here's my script: Import sys import json import cgi import cgitb import strip # 2 cgitb.enable () Print 'text / json content-type' Apiai_ke = '# 4 Json_deta = Siskstdinkreed () Jason_dikt = Jasonklods (Jason_deta) # 5 stripeAmount = Jason_dikt [' Stripeamunt '] = Stripekrrensi Jason_dikt [' Stripekrrensi '] = Stripetkeँ Jason_dikt [...

algorithm - Is this a special case of the NP-complete set packing? -

I'm almost certain that my problem is equal to setting packing, and thus, NP-complete, but I To verify. I have the following situation: There is a set of pen (i.e. the universe). A shop sells bundles of these pens, which are subsets of the universe. I know a person who has some pen (the largest part of the universe) from the store, but I do not know which bundle he bought. She has lost some pen and others have received from other bundles which her friends gave to her. What I want to do is sell the bundle sold from the shop to a subset of my pen, so that my friend has such a large number that I cover the maximum amount of pen and choose There should not be a pen in the bundle which is not my friend. For example: Possible pen: {0, 1, 2, 3, 4, 5} Bundle sold by store: {0, 1} | {0, 1, 2} | {2, 3} | {3} | {3, 4, 5} | {4, 5} My friend is: {0, 1, 2, 3} Here, the correct matches are: {{0, 1, 2}, {3}} and {{0, 1}, {2, 3} }}. These will be friends equal to 2: {0, 2, 3} In th...

python - pip install numpy fails with error 'cc1: error: unrecognised debug output level "record-gcc-switches"' -

When I try to install numpy in a virtualenv (I can not try system-wide installation) Error:: runtime error: broken toolchain: a simple program can not link here Some outputs that seem to be useful: $ pip install - upgrade numpy | Grep -i "error \ gcc \" Warning Warning: Distribution alert does not contain any files that anywhere match '* .pyc' in: '* .pyo no previous files anywhere delivery warning that match' not found before not -included files matching '* .pyd' delivery found anywhere in /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: unknown delivery options: 'define_macros' warnings.warn ( MSG) C compiler: GCC - pthread -fno-strict aliasing -fmessage- length = 0 -grecord -gcc-switch -fstack-protector -O2 -wall -d _FORTIFY_SOURCE = 2 -funwind- table -fasynchronous- Open Table G -DNDEBUG -fmessage- length = 0 -grecord- GCC-list -fstack- Protector -O2 -Wall -D_FORTIFY_SOURCE = 2 -funwind- table -fasynchronous- open-table ...

knockout.js - Durandal: Making a module of custom Knockout bindings -

I want to move all the custom bindings that I have made with the composition. I want to take EdbingHandler to a module , My main.js method is clearer I have shown them in the file lib / binding / binding.js , in the file needjs.config () Has an alias binding created>, and calls require call with call ('binding') . However, the error in this code is not yet loaded for reference module name "binding" reference: _ is required ([]) . How do I change this code to work properly? app.start () call app.start (). Then see the partial sequences in the 'Ideas' folder in the root // to view 'View' in the function () {// module ID. ViewLocator.useConvention (); Requirement ('binding' ); / / First: var structure = requires ('durnal / composition'); // first: composition.addBindingHandler () call which is now lib / binding / binding.js. $ .when (config.init () ). Function () {// Show the app by setting the root view model for our...

html - how to create Custom filter angularjs javascript controller side? -

How to create custom filter angular javascript controller side? I want to search by SegmentId in the array in the segment, to create a filter that filters the segment separated from the segment ID - // control $ scope.GetSegmentDetails = function (id) { $ Scope. Calculation Name = $ Filter ('Segment BIID') ($ Scope Section, ID); } // Filter app.filter ('Segment BIID', function) (return function (input, search pricing) {if (Search!) Return input; var results = []; angular (for input, function (person) { }}; Return result;} }) You do not have to type your filter to filter by Segment ID Here you have an example function micrification ($ radius, $ filter) {$ scope.data = [ {"Segment ID": "1", "{" Segment ID ":" 2 "," Description ":" HID passive "}, {" Segment ID ":" 3 "," Details ":" hod testup "}, {"Segment ID": "8", "Detai...

html - Conditional logic form -

I am trying to program a form with some conditional arguments. Question 1: Do you have a warranty form? No No If the visitor presses yes then I want to show the following: Question 2: Date of purchase? Write ur text here I have already received the code: Code Question 1 & lt; Div class = "form-section-content2" & gt; & Lt; Div class = "first-label-column-1-gray" & gt; & Lt; Div class = "form-content" & gt; Garantie bewijs meegeleverd * & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "first-label-column-2-gray" & gt; & Lt; Div class = "form-content" & gt; & Lt; Input class = "form-field" type = "radio" name = "garantie" value = "ja" & gt; Go & lt; / Br & gt; & Lt; Input class = "form-field" type = "radio" name = "garantie" value = "nee" & gt; N ...

ruby on rails - Cron jobs using Whenever with VM, Docker & Dokku -

I have Ruby on Rails app in a Docker Container at Ubuntu 14.04. I have established my deployment using Doku, but I am sure how my cron jobs can work properly. Currently I am using this which allows me to do something simple: every 5.minutes runner 'MyModel.run_something' end The problem is that I think that every time I deploy using git push dokku master , it resets the container and decides it back by default I remove all my cron schedule. Then I thought that cron scheduling should be done outside the container and VM Need to be on blood. I do not currently see any cron jobs, even if I do. > ssh: root @ dashboard: ~ # crontab -l No crossover for root I am very new to container virtualization so I apologize if I have left it on its important part but I am stumped. I was taken forever to work on this, call the rail command through the cronat Please. I have also got a rail app uploaded on the Dakoku with Ubuntu on the Digital Sea Server whenever t...

c - Balanced Parantheses Using Stack -

I am trying to construct a balanced bracket algorithm using the pile in the CI that way the parentheses are the same (like "( ) "Or" {} "or" [] ") but when they get mixed then I am getting a wrong answer What is the error in my code? int count = 0; Typedef configuration node {struct node * next; Four data; } Node; Node * top; Node * Local; Node * temp; Create zero () {top = NULL; } Zero push (four data) {if (top == NULL) {top = malloc (sizeof (node)); Top & gt; Next = zero; Top & gt; Data = data; } Else {temp = malloc (sizeof (node)); Temp- & gt; Data = data; Temp- & gt; Next = top; Top = temporary; } Calculate ++; } Four pop () {local = top; If (local == faucet) {printf ("empty stack \ n"); Return; } And {local = local-> next; } // printf ("% d \ n", top-> data); Return to top- & gt; Data; Free (Up); Top = local; Count--; } Et blank () {return top == tap; } Int match (four A, four B) {if (a == '[...

php - Validate Headers ON CSV & TXT -

I have a basic import tool that we are using to upload to our database using PHP. Here is a sample script. My question is how do I accept headers before importing? Actually check against a price to ensure that the correct file is being imported. I see everywhere online, but my headers can not get the answer SKU, value, active LOAD data LOW_PRIORITY LOCAL INFILE '$ file' table In sample . "Optionally closed" \ "lines suspended" by the your_temp_table field '\ N' IGNORE 1 LINES // Continue to run the rest of the script How to validate the header before running my query script? I $ file = $ _GET ['file']; $ file = urldecode ($ file); / / File is being uploaded on I think you'll get a $ file The first line of will be required to read and The comparison header will be from a specified list of headers: $ required header = array ('SKU', 'value', 'active'); // headers we $ f = fopen ($ file ,...

dns - PowerDNS pipe backend, fallback to recursor -

I want to set up a PowerDNS instance with two levels of resolution: A pipe backend is a fallback for a public repeater, such as 8.9.8.8 , I have set the pipe backend correctly and I can successfully query it I am What do I want to achieve now, when the pipe backend is not answered, I want to get a reply from a public repeater like 8.8.8.8 my pdns.conf In file I Permission-Recursion = 0.0.0.0 / 32 # Yes, open for my tests, rough-recursion = yes recursor = 8.8.8.8 But if I query for the domain not managed by my pipe backend, I get the following: $ host -t a www.goo Using the gle.com localhost domain server: Name: Localhost address: 127.0.0.1 # 53Name: www.google.com has no record Whether the PDNS-server is recursive Is there an exit code or other information in the pipe backend to tell you to go? / P> 0.0.0.0 / 32 that is not correct

c++ - Setting IndentWidth doesn't work in clang-format -

I have .clang-format in my home directory and indentwidth 4 as the following set on. But when I call clang-format- Style = ~ / .clang-format 'a.cpp to format my code, the indent width is 2. Like: // See the indent width 2. The original file width is 4, // but the clang-format it changes to width 2. Int main (int arguments, four consists * RGR []) {AA; Once(); Clan-format-derived output LLVM (http://llvm.org/): LLVM version 3.4.2 is optimized. Default target: x86_64-unknown-linux-gnu host CPU: core-avx-i How can I tell my code to the claude-format format (.h, .c Indent width 4? -style options It does not take any file path, it takes string file to indicate the use of a .clang-format file, and it is in the root directory of the file's processed file, or the working directory and Stdin looks at changing its original directories You can also give it a string that sets the options directly to you: clang-format -style = "{IndentWidth: 4,...

jsf - I need to close the browser window after the update -

I tried to complete the update but after not updating, need to close the browser window. & lt; P: commandButton value = "# {msg ['BTN-Save']}" Action Listener = "# {WikimboBin.Adapter Model}" Incomplete = "window.close ();" StyleClass = "BTN BTN-Primary" AJAX = "True" & gt; & Lt; / P: CommandButton & gt; window.close command will only work in IE Not on Firefox and Chrome, if you look in your Javascript console, you will see a warning on this "scripts only to close the windows that were opened by it". FYI:

audio - Python extract wav from video file -

संबंधित: मेरा प्रश्न है कि मैं कैसे वीडियो फ़ाइल से wav ऑडियो ट्रैक निकाल सकता हूँ, video.avi कहें? मैं कई लेख पढ़ता हूं और हर जगह लोगों को सुझाव देता हूं कि (पायथन से) ffmpeg एक उपप्रक्रिया के रूप में (क्योंकि कोई विश्वसनीय अजगर बाइंडिंग नहीं है - केवल एकमात्र आशा थी PyFFmpeg लेकिन मैं पाया यह अब unmaintened है)। मुझे नहीं पता कि यह सही समाधान है और मैं अच्छे के लिए देख रहा हूं। मैंने जीस्ट्रिमर को देखा और मुझे अच्छा लगा, लेकिन मेरी जरूरतों को पूरा करने में असमर्थ - एकमात्र तरीका है जो इसे कमांड लाइन से पूरा करने के लिए मिला I gst-launch-0.10 playbin2 uri = फ़ाइल: // `pwd` / EX.mp4 ऑडियो-सिंक = 'पहचान एकल खंड = सच! ऑडियोकॉनवर! ऑडियो / एक्स-कच्चे- int, एंडियननेस = (इंट) 1234, हस्ताक्षर किए = (बूलियन) सही, चौड़ाई = (इंट) 16, गहराई = (इंट) 16, रेट = (इंट) 16000, चैनल = (इंट) 1! Wavenc! Filesink location = foo.wav ' लेकिन यह कुशल नहीं है क्योंकि मुझे वीडियो चलाने के दौरान उम्र की प्रतीक्षा करने की आवश्यकता है और साथ ही wav फाइल को लिखना ffmpeg बहुत बेह...

objective c - What's the best way to store a Framework/API key for an iOS/Mac project? -

As an example, we take the Google APIs, to start using your framework properly, The key should be / P> Since I do not want the keys to be clearly available in a configuration file inside .ipa, I am specifying the api key in one of my implementation files, such as something: code Is this the best way to do this in terms of security? If not, what options do I have? Thanks in advance!

In what order does gulp process tasks? -

I am a little confused about the object in which the work of Galpa has been completed. Allow me to explain. In Gulpfile.js, I have a set of all the necessary functions. The basic template for each sub work gulp.task ('compress: customName', function () {return gulp.src (['app / folder / file. Js', 'app / folder / file.js']) .pipe (gp_concat) (' App.customName.min.js')) .pipe (gp_uglify ()) .Pipe (gulp.dest (distDir));} ); Then, I have a task that rules them all gulp.task ('compress: all', ['compress: CustomName1 ',' compress: customname 2 ',' etc ... '], function () {}); Then another master task runner (using just seconds: all for this example) gulp.task ('master' ['Compress: all'], function () {return gulp.src ('dist / *. Js') .pip (notify ("compression complete");}; OK ... this is the basic setup ... now to talk about the order that these tasks are completed acc...

javascript - Fastest debounce implementation -

Image
In my application, I have some heavy functions in the scrolling event. To limit the frequency of execution, Using the method: var timeout; Document.addEventListener ("scroll", function () {explicit timeout (timeout); timeout = set timeout (function () {// some heavy code}, 200);}); Is there a better way to do this? Is not set up from time to time to be very heavy to fire? EDIT: What concerns me with the most memory usage - I think every settimeout is allocating something, it is a memory allocation from the Chrome timeline (this bella :):

Wordpress plugin to create posts list style -

I'm trying to find some WordPress plugins that make a custom post type as a list (example " Top 10 Best WordPress Plugins "), where you can add or remove items, I want to make posts like Listverse.com or Whatculture.com. If someone knows about such a plugin, please advise. Thank you!

node.js - How do you export a variable from app.js into another route in Node js -

I am using socket.io in my node project and want to know how to possibly export the IO variable I have done this yet, but I get this error: object # & lt; Object & gt; App There is no way in JS: var express = require ('express'); Var path = requirement ('path'); Var requires favicon = ('service-favicon'); Var Loger = Required ('Morgan'); Var requires cookieParser = ('cookie-parser'); Var bodyParser = is required ('body-parser'); Var routes = requirement ('. / Route / index') (io); Var requires user = ('./routes / user'); Requires Var app = ('Express') (); Var requires server = ('http'). Server (app); Var io = Requirement ('socket.io') (server); Server.listen (4000); Required ('./roads / index') (Io); // View engine setup app.set ('views', path.join (__dirname, 'views')); App.set ('visual engine', 'z'); // app.ws (favicon (__dirname + '/ p...

plot - R - upload current ggplot2 to imgur -

The package is actually what I want, but with a scan of the docs it seems that it only uploads files Can I upload the current plot device without outputting the file? Especially I am interested in uploading plots made from ggplot2. Here's what I tried: & gt; Token = imgur_login ()> Ggplot (dstat, AES (x = obs, y = tcp)) + geom_line () + theme_bw ()> Error in file.exists (file) in file_exam (token = token): Logic "file" is unavailable, without any default Edit: I should add, I have a method with ease I invisibly creates a file in the background, then uploads it, it is not just the display of plots for the right presentation Edit: Even the code I have made so far It does not work well because it does not work It seems that the cache used inside account_albums is not easily disabled. get_or_create_album = function (token) {# I can not find any way to disable cache inside #account_labs - this is the first time the # results gives. # So if this funct...

linux - Checking wether a directory exist in the home directory -

The weather attempt is present in the home directory if [! -d "$ HOME / Smart_Cycle"]; Then the McDear SmartChill $ diaperpath "Creating Directory" "FI is trying to check the weather, the Smart Directory is present in the home directory, and if it does not exist then it will create the directory Whether it is happening or if I'm on the right track. While running the script, I have two errors which I have never seen before. / SmartCycle: Line 4: Unexpected ` Looking for matching '' ./smartcycle EOF: Line 6: Syntax Error: Unexpected End of File You had an extra quotation mark echo "Creating a directory" " Try it out if [! -d "$ HOME / Smart_Cycle"]; Then you can create more than one directory at one time mkdir ABC Code> In your case, $ DIRPATH will be evaluated and $ DIRPATH indicated in the value contained in another directory

elseif in php code is not working -

This is my php code and if the statement is not working please help me. thank you in advanced. if ($ row = mysql_fetch_array ($ Result 1, MYSQL_ASSOC)) {$ pv = $ row ['pv']; Cv = $ line ['cv'] $; If ($ pv == "first_name") {$ sql1 = "set user fname = '$ cv' where id = '$ id'"; $ Result1 = mysql_query ($ sql1); } Elseif ($ pv == "Last name") {$ sql1 = "User set lname = '$ cv' where id = '$ id'"; $ Result1 = mysql_query ($ sql1); }} Your code looks okay so that you can otherwise get rid of if ($ line = mysql_fetch_array ($ result1, MYSQL_ASSOC)) {$ cv = $ row ['cv']; $ Column = "fname"; If ($ line ['PV'] == "last name") {$ column = "lname"; } $ Sql1 = "Update the user $ column = '$ cv' where id = '$ id'"; $ Result1 = mysql_query ($ sql1); }

java - Mockito: mock object in call hierarchy - chained call -

Is it possible to duplicate an object with mokto, which is said somewhere in the object hierarchy? Let's consider the following sections: @Component Class A @Autowired BB method get salary () call b.calculateSalary () @Component Class B @Autowired C C method is calculated () Call c.getDatabaseSalary () In the unit test, I would like to check the unit from received celebery to class A , but simulated same one In time, so that I change the value in lieu of getDatabaseSalary () when this method is called in the hierarchy. You can do this with some changes in your design. EDIT: Based on your comments, you are working on integration testing. Something like this will appear in the exam. @ etowar private AA; @ Owned private BB; @ Mock private cc; @ Before public idle setup () (Mokitenation. Itmax ();} @Test Public Zero Test () {b. STC (c); when (c.getDatabaseSalary ()) thenReturn (...). A.obtainSalaryA ();}

javascript - Java: ReplaceAll String with another string -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब मैं अपेक्षाकृत नया हूँ यह ... मैं प्रतिस्थापन करने की कोशिश कर रहा हूं जो कि संख्यात्मक मान के साथ एक स्ट्रिंग में "PRICING" के सभी उदाहरणों को बदल देगा जो कि एक चर है: PRICE सदस्यता = सदस्यता। स्थान ("PRICING", PRICE); नीचे मुझे जो त्रुटि मिलती है। विधि आवंजन में त्रुटि: विधि प्रतिस्थापित सभी (java.lang.String, double) class_java में नहीं मिला .lang.String ' आपकी मदद के लिए धन्यवाद कोशिश करो यह: सदस्यता = सदस्यता: स्थानापन्न सभी ("PRICING", String.valueOf (PRICE));

c - How to properly use `__attribute__((format (printf, x, y)))` for C11 U"unicode literals"? -

I use an application using char * for everything and everywhere in UCS 4's I am porting to use because it is internal Unicode representation I use C11's U "Unicode Literals" for defining the string, which is the char32_t The array is expanded, which is essentially uint32_t . The problem is with the comment properly printf -like functions like "format" is no longer char * , the compiler refuses to compile it further Also, it will not be happy with char * instead of char32_t * format for % s , I think is. I do not rely on stdlib * printf family, so the formatting is done entirely by implementing it. In addition to completely disabling this feature, what is the right solution for this? There is currently no way to do this in GCC, it is a known bug,

math - Panning camera so object is at edge of screen -

I am trying to write a formula to pan the camera so that the center point of the object is just visible on the edge of the screen Therefore, in other words, if the object is right out of sight, then I will change the position of the camera's X and Y, so that the object is on the right edge of the screen (without changing the angle or Z of the camera). Can anyone point me out how to do this? "post-text" itemprop = "text"> But the only way I could do this by modifying the camera height (which I really did not want to do): // Note: Pose is the center of the object that is displayed on it // // // the map of the camera // m_position is the 3D position of the camera / / m_plane [] array of left, right, etc. Camera Fighter Zero Aircraft Camera :: Panto (Contect Vector 3D & Pauses) {int n; Vector 3D vector diamond; (N = 0; n> NUM_PLANES; n ++) {If (m_plane [n] .GetDistance (pos)

c# - .NET Framework 4.5 - EF exclude "ufloat" columns from MySQL database -

I try to write some program on the server to help manage some data via SSH tunnel via remote access I am doing Server MySQL version: 5.1.73-CLL I am on PC with Visual Studio 2012, .NET Framework 4.5, Latest MySQL Connector (6.9.4) and MySQL VS For the connection of the established database (1.2.3) works fine, I created the .edmx file with the "Generate from database" wizard. I created some organizations and started building my program. But then I realized that some columns have gone, tried the update model from the database, and then seen the message (not errors) in the error log: Message 30 Data type 'Eflot' currently target Is not supported for. NET Framework Edition; The column 'spa' was excluded from the table 'game_data.monster_sold'. And for such messages every UFO and udouble I tried to find a solution but it seems that there is no match for this message. There is not a single topic about this, but maybe I do not know how (or how t...

oracle - How to display multiple rows from a table without using cursor? -

I have an existing table I have a selected query that can return several rows I display all the rows I want to return this query, without using a cursor How can I get it pl sql ? If I understand your question right, the following is a possible solution: starts for T (select 'data_1' col_1, 'data_2' col_2, 'data_3' from dual to col_3) lOOP dbms_output.put_line ('query return:' || T.O.L.I.I. | ',' || TEOOLOX ',' TOOOLOfCLX '); End loop; End;

Drawing on top of an existing graph Python Matplotlib -

Image
Then I am writing a program that is using matplotlib to plot the initial original graph and then Puts points on it What I was aiming to do was to place the mouse on a certain point in the graph and click to add points I can not find any such form that clearly tells how the input point is actually as the plot of the initial graph After the mouse is clicked on. Even what I have so far Import matplotlib.pyplot as plt import nmpy as npy x, y, vx, vy = npy.loadtxt ('issmplotdat.txt', delimiter = ',' Unpack = true ) Element = npy.loadtxt ('issmplotdatelements.txt', delimiter = ',') vel = npy.sqrt (vx ** 2 + vy ** 2) fig = plt.figure () plt.tricontourf (X, y, Element, or) plt.hold (True) plt.plot (3,9, 'ro') def on_keyboard (Event): print "You pressed", event.key, "\ nat:", event.xdata, event. Print 'plot' def on_click (event): print ('ehllo') print 'you pressed:', event.button, '\ nat:', Event....

Is there any example in Couchbase PhoneGap with REST API -

There are some examples that were developed with the Coachebase Light Phonegap plugin but there is no instance with the REST API and the PhoneGap plugin. . Can we use the rest of the API with the phonegap plugin in the couchbase? What is your use case for using reverse API with PhoneGap plugin for CouchBase Mobile? ? What are you trying to do and

ruby on rails - before_action Not Running Before Edit Action -

I want to make some calculations based on the integer values ​​in the database of "user" class. (Using Devise.) This users / show.html ARB , but not Registration / edit.html.erb (localhost: 3000 / user / editing) For this, I Set up in users_controller.rb before_action: set_calc_vars, only: [: edit,: show] edit df @username = user. FIDD (Param [: ID]) Answer_to do dot | Format | Format.html # edit.html.erb format.xml {Render: xml = & gt; @ User} End and show show @ user = user.fid (param [: id]) answer_to do it. Format | Format.html # show.html.erb format.xml {Render: xml = & gt; @User} End and Protected # Defined set defaults to set_calc_vars user_client = User.find (params [: id]) @rev_left = user_client.revlimit - user_client.revused End Pages on both, the code to display the value of @rev_left is: I do not know why set_calc_vars is running on show.html.erb but not edit.html.erb log on to show.html.erb Displays the correct integer value for ...

twitter bootstrap - How do I change slide time in SJ Carousel -

I need to change the amount of time a slide is being shown in SJ Kerosail. It is not a transit or fading time I am not talking about that time when moving from one slide to the next, but how many times the slides are shown. How can I do this? I read similar forums and nothing helps, I have changed this code to a CSS file in Joomla, as well as the bootstrap.min file defined as 1 second instead of 1, but it Only changes from one slide to the other changes the time ... carousel-interior & gt; .item {display: none; Status: Relative; -webkit-infection: easily left in 0.6 seconds; -Mozy infection: easily left in 0.6 seconds; -O-Infection: easily left in 0.6 seconds; Infections: easily left in 0.6 seconds; } Can anyone help me? Thanks! For SJ Carousel Joomla Extensions see. Under Effects options , you will define only the duration (in milliseconds) in the Interval field in your module.

SSAS Drillthrough in Excel -

Image
I have a problem when trying to drill in Excel I have a fact table of employee closure set up like the following Each line is an ending. Drillithu function in SSAS I ASSP.GetCustomDrilthroughMDX I'm actually using a new verb in the cube with the following action expression. 'call ASSP.ExecuteDrillthroughAndFixColumns ("' + ASSP.GetCustomDrillthroughMDX (" [employee]. [Employee ID], [employee employee] [company name], [employee employee]. [Last name], [employee employee]. [First name], [employee employee]. [Start date], [employee employee]. [Last worked], [[employee employee] [hr title], [employee * ] [Job Title], [Employee] [HR Status], [Employee Employee]. [Location ID], [$ Section]. [Division Number [], [[Name of the Department], [$ employee]. [Supervisor], [Division $]. [Division Name] ") '' '' '' Condition [remedies]. Newsletter member [remedy] [Unethical] or [remedy]. The centenary is [remedy]. [Voluntary] Whe...

c - Which for loop is better? -

The question below was asked in the Microsoft Placement Examination. I do not know who would be better, can someone help me? Code 1: int MAX = 1000; Int a [MAX] [MAX]; For (i = 0; i & lt; MAX; i ++) for (j = 0; j and lt; max; j ++) a [j] [i] = i * j; Code 2: int (j = 0; j and lt; max; j ++) a [i] [j] = i * J. Max = 1000 for (i = 0; i & lt; MAX; i ++); Int a [max] [max]; Which is correct? Code 1 is fast Code 2 is fast Both are the same In the difference how they use memory, your array is kept in this way: line 0 - 1000 Integer line 1 - 1000 integer etc. Now, your first loop will access one [0] [0] , then a [1] [0] , e.t.c. So it's going to find row 0, then find and update column 0. Then it is to find line 1, find column 0 in it and access it. So you are accessing memory everywhere - essentially it is bad for the CPU cache randomly because it has to be reloaded with every memory access. Accesses your second loop a [0] [0] , then a [0...

asp.net - Auto-saving in VB.NET after inactivity -

I am in the best way to accomplish this. I am running a VB.NET web application that will automatically redirect to a main index page after about 20 minutes of inactivity. Before this redirection I want to "autosave" our SQL server. But I can not understand any way to trigger this save function before redirecting. What would be the best solution for this, provided I need to keep my current code the same? Protected sub page_load (e-mail as an object in the form of vilely sender, eventAg) Javascript ClientScript.RegisterClientScriptBlock (Me.GetType) to reload the page after 20 minutes of inactivity (), "Script", "& lt; script language = 'javascript'> setTimeout (function () {window.location = 'http: // www. Txicology.org / ai / meet / master / adminMtgsdept.aspx ';}, 1200000); & lt; / script & gt; ") Is AJAX an Option? You can use AJAX control toolkit timer controls to trigger the server-side method that saves your...

c++ - how to shift elements of array (or c-string) left by a given number indexes -

I am writing a function to move the letters of my C-string through the number of characters described. At present, this ceremony will leave the characters, but I am losing one. I know that this kind of indexing issue is with my loop, but I can not pin it down. Edit: From left I mean: The string of an initial C-A, B, C, D is shifted to the left index, then it will be the same array B , C, D, A is equal to, if two indexes are shifted to the left then this same c-string would be equal to c, d, a, b So my code is: #include & lt; Iostream & gt; using namespace std; Zero shift byte (four Marray [], int size, int shift by) {four taps; For (int i = size -1; i> gt; i--) {temp = myarray [size + shiftBy]; MyRare [size + shift] = myar [ii]; Mayor [I] = Temporary; }} Int main () {char myarray [20] = "test"; Int size = 4; Shift byte (amerare, size, 1); For (Int i = 0; I This is my work which changes every element on the right, whatever I have to do, turns this lo...

Bash if-then statements for pattern -

Find some help with if / else statements I have 2 variables for which I want to see an if statement Can I match one pattern within var1 = "15" var2 = "1 | 2 | 3 | 4 | 5" If [[$ var1 = ~ $ var2]] does not match again It looks like I try it. I'm feeling that my syntax is wrong. I have to get a 15 or no, a 1 or a 5. to help [[ : When the `= ~ 'operator is used, the string corresponds to the right side of the operator as a regular expression. Your syntax is fine, if something is weird, I will personally use Category [1-5] . var2 = "[1-5]"

xpath - Click an element based on attribute -

मेरे पास यह कोड है: & lt; div class = "menuFamille" idcat = " 1025 "& gt; & Lt; div class = "menuFamilleButton on" & gt; आइटम 1 & lt; / div & gt; & Lt; / div & gt; & Lt; div class = "menuFamille" idcat = "1026" & gt; & Lt; div वर्ग = "मेनूफिमिलीबटन ऑन" & gt; आइटम 2 & lt; / div & gt; & Lt; / div & gt; मुझे पता नहीं है कि कैसीपर जे एस में idcat = "1025" के साथ पहली डिवीज़ पर कैसे क्लिक करें क्या मुझे XPath का उपयोग करना चाहिए? बस एक विशेषता चयनकर्ता (सीएसएस) का उपयोग करें। XPath अभिव्यक्ति की कोई आवश्यकता नहीं है, लेकिन मैं इसे तुलना के लिए जोड़ूंगा: casper.click ("। Menufamille [idcat = '1025' ] & Gt; .मेनूफिमेललेबटन "); या कैस्पर.क्लिक करें (x ("// * [इसमें (@ वर्ग, 'मेनू फ़ामिली ') और @ idcat =' 1025 '] / * [इसमें (@ वर्ग,' मेनूफिमिलीबटन ')] "));

vba - Remove email attachments after saving them and adding save location to email in Outlook -

I created this macro from which I do the following: Choose a folder Select the date range to download email attachments After the email has been saved, I need to delete an email saved attachment and change it. is . Resume option to clear the following sub-SaveMailAttachments (): With the link to the location where it was saved here the code I have been using the namespace set ns = GetNamespace ("MAPI") set the inbox MAPIFolder inbox = ns.GetDefaultFolder (olFolderInbox) Dim SaveFolder string as the dull subfolder MAPIFolder dim item item dim as attachment dim file name In the form of a string, fName as Attached Stri In the form of slow dimd as I recite the slowed searchdate string as SentDate as the string slow sntDate as the date searchdate = InputBox attac ("Enter a previous date to search from" ") SaveFolder = BrowseForFolder (" Select the folder for hments you would like to save. ") If saveFolder = vbNullString then exit sub-I = ...

python - add delimiter to fixed-width text file -

I am trying to add a delimiter to a fixed-width text file. This is exactly what I'm far away from: Output as Open ('output.txt', 'w'): (' with list = [4] , 29,36,36,45,70,95,100,111,115,140,150,151,152,153,169] Inputetyxt ',' r ') as infile: for the line in infile: newline = line [: 4] +' | '+ Line [4:] outfile.write (newline) outfile.close () The above code inserts a pipe at 5 bytes. Now I want to add a pipe to the list at the next price (29). I'm using Python 2.7. I think this is what you want to do: list = [4,29,36, 36,45,70,95,100,111,115,140,150,151,152,153,169] R ') as: for the line in the infile: iter = 0 prev_position = 0 position = list [iter] temp = [] while the position is & lt; Lane (line) and IARA + 1 & lt; Len (list): iter + = 1 temp.append (line [prev_position: position]) prev_position = position position = list [iter] temp.append (line [prev_position:]) temp_str = '.join (x + "| Temp...

oracle - ORA-00001: unique constraint primary key violated -

यहां एसक्यूएल भाग है और मुझे एक ओआरए 00001: अद्वितीय बाध्य प्राथमिक कुंजी का उल्लंघन किया गया है त्रुटि जब मैं कोड से डिबग करता हूं T_LIAV_AGENT_STATE_APPROVAL पर ... और ये 2 कॉलम हैं जो कि प्राथमिक कुंजी बाधा AV_NAME_ID, AV_STATE पर रिले करते हैं .. मेरे प्रति कोई डुप्लिकेट डेटा नहीं है ... क्या आपको कोई अन्य कारण लगता है? यदि आपने 'बनाएँ तालिका' विशेषाधिकार प्राप्त किया है, तो dbms_errlog पैकेज का उपयोग करें। स्क्रिप्ट चलाएं: आरंभ करें dbms_errlog.create_error_log ('DBO.T_LIAV_AGENT_STATE_APPROVAL'); समाप्त; / एक अतिरिक्त खंड के साथ अपनी INSERT स्क्रिप्ट चलाएं: INSERT में dbo.T_LIAV_AGENT_STATE_APPROVAL SELECT ... से .. लॉग त्रुटियां $ _T_LIAV_AGENT_STATE_APPROVAL अस्वीकार करने के लिए सीमारेक्षित असीमित; त्रुटियों के लिए त्रुटि लॉगिंग तालिका की जांच करें: चुनें $ _T_LIAV_AGENT_STATE_APPROVAL; आप सभी अभिलेख देखेंगे, जो बाधाओं का उल्लंघन करती हैं, और त्रुटि संदेश।