Posts

Showing posts from May, 2012

javascript - This jQuery, Moment.js script won't display in SharePoint Online script editor web part, any ideas why? -

I have set up a script editor Web part in my SharePoint online account. The results show that when I am Page Edit , but not when Browsing page Here's the script I'm using: & lt; H3 & gt; You are married: & lt; Span id = "married" & gt; & Lt; / Span & gt; & Lt; / H3 & gt; & Lt; H3 & gt; Adam was born: & lt; Span id = "adamborn" & gt; & Lt; / Span & gt; & Lt; / H3 & gt; & Lt; Script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "https://mysite.sharepoint.com/tech/Scripts/moment-with-langs.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Function SetMoments () {Wedding = $ ('# Married'), Date = Moment ("1955-12-05", "YYYY-MM-DD"), Update = function () {married.html (date. FromNow ()); }; Updates(); Var adamBorn = $ ('# ...

PHP MySQL Insert Form not working -

मेरे पास एक user_id INT (4) ऑटो incrementing, full_name varchar (20) और "culvers" नामक एक MySQL डाटाबेस है एक उपयोगकर्ता_नाम varchar (20) मैं तालिका में मान जोड़ने के लिए इस HTML फ़ॉर्म का उपयोग करने की कोशिश कर रहा हूं, लेकिन यह काम नहीं कर रहा है। मैंने दर्जनों ट्यूटोरियल और सहायता साइटों का पता लगाया है, और यह अभी भी काम नहीं कर रहा है। मैं यह भी देखने के लिए कि क्या यह समस्या थी, दूसरे होस्टिंग प्रदाता पर कोड डाल दिया जब मैं "ऐड" पर क्लिक करता हूं तो मुझे रिक्त पृष्ठ पर ले जाया जाता है (जो उम्मीद है, क्योंकि मेरे पास कोई सफलता / त्रुटि संदेश नहीं है), लेकिन डेटा डेटा डेटाबेस तालिका में सम्मिलित नहीं है। इसके अलावा , मुझे पता है कि मुझे अपने आदानों को साफ करना चाहिए, लेकिन यह अभी इस मुद्दे पर नहीं है। (कम से कम मुझे ऐसा नहीं लगता) यहां form.html कोड है: & lt; html & gt; & Lt; शीर्ष & gt; & Lt; title & gt; तालिका में उपयोगकर्ता जोड़ें & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; h1 ...

printing - How can I print a BufferedImage with Java? -

I want to print the content that I need to print the contents of a zpnil Keep the content as an image from BufferedImage . How can I print that image? One JLabel , and I call it BufferedImage . Hope this is what you are looking for. yourJPanel.getGraphics (). Picture (your buffard image, 0, 0, empty);

c# - Many to Many relationship EF with foreign keys -

I want to configure many relationships between 2 entities but I would also like to expose my foreign key. I found a solid solution online like the following: modelbuilder.Entity & lt; E1 & gt; () .HasMany (t = & gt; TE1). With many (t => TA2S) .map (M => {M.TeTable ("E1E2"); M. MAPLft ("FKE1"); M. MapRightkey ("FKE2" );}); But the left and right key of the map does not take any quality from my model, so I do not have access to them and they will not be filled when I query. Therefore, I do not have access to my foreign key properties. Hope I was able to describe my problem. Can someone recommend other options? You can create an Associate Model which has the key to two entities: Public Sector Associate Entity {{Key] Public Gide Associate {Receives Antidiate; Set; } Public Guide Entity1Id {get; Set; } Public Guide Entity2Id {get; Set; } [Display (name = "unit 1", resource type = type (resource language))] public...

javascript - How to read a part of a line with DOM? -

I am familiar and know how to read the special tags of an HTML page. But now, I want to read a part of a line in the JS file, and I do not know how to do it. Here is the text of my java script: Var gblock = ''; VergaBatital; If (gblocktitle == undefined) {gblocktitle = 'title'; } Gblock + '' & lt; Div class = "g-block" & gt; '; Gblock + '' & lt; Div class = "g-block-title" & gt; '; Gblock + = gblocktitle; Gblock + '' & lt; / Div & gt; '; Gblock + '' & lt; Div class = "g-poem-block"> '; Gblock + '' & lt; Div class = "g-m1" & gt; Part1 & lt; / Div & gt; '; Gblock + '' & lt; Div class = "g-m2" & gt; Part2 & lt; / Div & gt; '; Gblock + '' & lt; Br style = "clear: both;" / & Gt; '; Gblock + '' & lt; / Div & gt; '; Gblock + ''...

sql - How do I check if a table have matching record in another table? -

मैं टेबल निम्नलिखित: तालिका 1: AccessMenu उपयोगकर्ता आईडी 1 ए 2 बी 2 सी और तालिका 2: ActionRights idAdmin itemCol 2 वी 2 मीटर 2 घ वांछित परिणाम: कोड> ActionRight इसे वापस चाहिए हां अन्यथा नहीं मैं क्वेरी के नीचे की कोशिश की:। AccessMenu.userid, मामले का चयन जब ActionRights.IdAdmin = AccessMenu.userid तो 'हाँ' और कुछ 'नहीं' AccessMenu से 'जीआरपी' के रूप में अंत ActionRights.IdAdmin = AccessMenu.userid पर ActionRights में शामिल होने के लिए छोड़ दिया लेकिन इस प्रश्न के माध्यम से मुझे बार-बार परिणाम मिल रहा है: यूजर आईडी हाँ / नहीं 1 नहीं 2 हाँ 2 हाँ 2 हाँ 2 हाँ 2 हाँ कृपया मेरी मदद करो। का चयन करें userid, मामला है जब idadmin शून्य फिर से 'नहीं' शेष 'हाँ' अंत के रूप में 'समूह' है (accessmenu.userid प्रयोक्ता-आईडी के रूप में चयन, actionrights.idadmin IdAdmin रूप से Accessmenu LEFT कार्यवाही को क्रियान्वित करने के लिए एक्शनआरइट.आईडडमिन = एक्सेसमेन्यू। यूज़र), z

dictionary - Should all dict params in python decorated by asterisks -

def स्वीकार (** kwargs): पास अगर मैं परिभाषित स्वीकारा और मुझे उम्मीद है कि यह एक परम से गुजरते हुए कहा जाता है, क्या सभी डिक्ट पैरामिक्स के लिए तारांकन आवश्यक हैं? क्या होगा अगर मैं ऐसा करता हूं: def स्वीकार (dict): pass dict = {...} स्वीकार (dict) विशेष रूप से बोलते हुए, मैं एक वर्ग के लिए एक update विधि को लागू करना चाहता हूं, जो कंटेनर के रूप में एक डिक्ट रखता है बस dict.update विधि की तरह, यह एक परोप के रूप में एक dict लेता है और कंटेनर की सामग्री को संशोधित करता है। इस विशिष्ट मामले में मुझे क्वार्ग का उपयोग करना चाहिए या नहीं? नीचे f देखें। फ़ंक्शन f के दो मापदंड हैं, एक स्थितिबद्ध जिसे नाम और एक कीवर्ड तर्क संदेश कहा जाता है। वे फ़ंक्शन कॉल के फ्रेम में स्थानीय वेरिएबल हैं। जब आप f ("John", ** {"foo": "123", "message": "हैलो वर्ल्ड"}) , फ़ंक्शन एफ / कोड अनपैक को स्थानीय चर में इसकी कुंजी / मान जोड़ी में होगा। अंत में आपके पास तीन स्थानीय varaibles हैं: नाम , foo = 123 , और संदेश = हैलो ...

How to make the list of lists into a single list by interleaving elements in haskell? -

सूची की इनपुट सूची कैसे लें और string = [[1, 2 , 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13,14,15,16]] आउटपुट सूची की तरह हैस्केल में यह प्रारूप? [1, 2,5, 3,6 9, 4,7,10,13] इस का उपयोग करके प्रारूप पुन: व्यवस्थित करें: [[ए]] - & gt; [ए] एक्सएस = ?? को पुनर्व्यवस्थित करें 2 डी सूची में सभी तत्वों को निकालने की इच्छा के रूप में मैं ओपी को भूल गया। यहां एक फ़ंक्शन का एक संस्करण है जिसे मैंने मूल रूप से इस्तेमाल किया था जिसका सही व्यवहार है: पिरामिडटी :: [[ए]] - & gt; [[ए]] पिरामिड टी [] = [[]] पिरामिड टी (पंक्ति: पंक्तियों) = ज़िप () पंक्ति ([] :( पिरामिड टी पंक्तियां)) पुन: व्यवस्थित करें :: [[एक]] - & gt; [ए] पुन: व्यवस्थित करें टी = कॉन्सैट पिरामिड टी - घी & gt; पिरामिड टेस्टडेटा - [[1], [2,5], [3,6 9], [4,7,10,13]] - घी & gt; पुन: व्यवस्थित करें टेस्टडेटा - [1,2,5,3,6,9,4,7,10,13] (पिछला पोस्ट:) यहां एक है पुनरावर्ती समाधान मुझे यह पसंद नहीं है कि मेरे पास सहायक h को बदलने के लिए उपयुक्त उच्च-क्रम फ़ंक्शन नहीं है मान hab को zipW...

Should a custom Java HashMap size be used? -

I am working on a Minecraft PvP mod and a Hashup to store every player's name with my team I want to use. They will have a total of 64 players in a match and at one time there will be only 1 match on the server. Do I have to use Hashp that is 64 slots? I had a very bad time in the past that I understand how it works, I am starting it right now. itemprop = "text"> No, if the hashmap default to 0.75, keep your load factor automatically The size will increase if you do not specify anything even if you do not explicitly do anything about it, then when you do not use all 64 entries then your hashmap will increase as much as you organize it. Because you want to specify in the initial capacity, in fact only if you already know that you are going to fill it with at least a few entries, so that it will be re- Sharing and re-assigning will have to be above. In short: If you leave only Hashmap leaving your code, then this is usually OK. :)

c# 4.0 - Linq Invalid Cast Exception Same Object Type -

I have written this question and as I have improved my understanding of business rules, I have modified it. In this most recent visit, I was testing to see that in fact I have some redundancy which can be removed. Let me query you first error. Public listing & lt; ExternalForums & gt; GetAllExternalForums (int extforumBoardId) {list & lt; ExternalForums & gt; Xtrnlfrm = new list & lt; ExternalForums & gt; (); Var query = _forumExternalBoardsRepository.Table. Where (id = & gt; id.Id == extoformBoardId). Select (ExtForum = & gt; ExtForum.ExternalForums); Foreign currency (external forum item in query) {xtrnlfrm.Add (new external forum {id = item.id, forum-name = item.forname, forum url = item.form url}); } Return xtrnlfrm; } It is not clear now that the query is returning the list of ExternalForums. I then add loop and item to the list of other fororphorphis objects through the list. This is redundancy which was hoping to remove me. The preco...

When doing memory analysis in Java, TreeMap is found inside the object -

Image
I'm new to memory analysis in Java. I have performance report message , which is the cost of 25k memory to me: When I look at the object in memory analysis in Eclipse, then I think inside a TreeMap The structure, which eats the most size of the whole object. This is my question: Where does the treemark come from? I do not have the TreeMap structure in the class definition. I would like to reduce the size of the object as much as possible. Any possible way to do this? 1) It looks like this quickfix.fix42. ExecutionReport is inside the object .. ?? Update: This is actually inside quickfix.fix42.ExecutionReport , by which the succession increases the quickfix.FieldMap class, in which two TreeMaps 2) Remove the performance report from your exception and archive the field you need it.

javascript - Node.js throws write EIO exception at random time -

I am writing a game server using node.js + socket.io + Winston and My server dies every day due to this exception: Error: Write EIO to mistake appointment (net.js: 901: 11) Object.afterWrite (net.js: 718: 19) I suspect that I am using Winston. I have server.js and room.js classes in which I need Winston with this statement: var winston = require ('winston'); and server.js I register this file with logging: winston.add (winston.transports.File, {filename: 'Server.log'}); Winston.handleExceptions (new winston.transports.file ({filename: 'errors.log'})) in room.js I just Winston .info () method Can it be due to many rooms examples or something? pause apache crash : By using this module you can crash your app You can write your code in the domain block and it will never crash again. But be careful, you have to solve your problem first

distribution - R function pmvnorm: Why do values and errors differ every time I run this function with the same inputs? -

In my understanding, the pmvnorm multivariate in the mvtnorm library is a function to calculate CDF on general distribution. So this is a determining function. However, I found that the result every time I run this function with the same input. Here is a small example. Library (mvtnorm) below & lt; - c (-Inf, -0.07, 0.81, -Inf, 0.8 9, -Inf, 1.33, 1.21, -inf) Upper & lt; - c (1.00, 0.34, 0.98, -0.04, 1.07, 0.01, 1.48, 1.38, 0.09) Sigma & lt; - Matrix (C (0.03, 0.00, -0.01, 0.00, 0.00, 0.00, 0.00, 0.02, 0.00, 1.00, 0.66, 0.64, 0.64, 0.64, 0.64, 0.64, 0.64, -0.01, 0.66, 0.99, 0.66, 0.64, 0.64, 0.64, 0.64, 0.64, 0.00, 0.64, 0.66, 1.00, 0.66, 0.64, 0.64, 0.64, 0.64, 0.00, 0.64, 0.64, 0.66, 1.00, 0.66, 0.64, 0.64, 0.64, 0.00, 0.64, 0.64, 0.64, 0.66, 1.00, 0.66, 0.64, 0.64, 0.00, 0.64, 0.64, 0.64, 0.64, 0.66, 1.00, 0.66, 0.64, 0.00, 0.64, 0.64, 0.64, 0.64, 0.64, 0.66, 1.00, 0.66, 0.02, 0.64, 0.64, 0.64, 0.64, 0.64, 0.64, 0.66, 1.00), bio = TRUE, length (lower)) set.seed (1)...

Updating SQL server table with vb.net 2010 datagridview -

I have trouble updating my database table with datababridge, I have read some thread about the problem and some Not even my case. Here the code I use is DataGridView populated. public DATE filldatagridserver (as byRef SQL string, byRef DG as DataGridView) MyDataset Dataset = new dataset myAdptr.SelectCommand = new SqlCommand (sql, cnSQL) myAdptr Fill (myDataset) dg.DataSource = myDataset.Tables (0) dg.AutoResizeColumns () myAdptr.Dispose () myDataset.Dispose () cnSQL.Close () End Sub This sub process with code says: call filldatagridserver ("select * from tblQuarterCollection", dg quarter) I used already MyAdptr .update but I table While getting an error about mapping, I tried to settle and also said that in the sub process, to try to quote a lot out but it still does not work. Anyway, fill the DataGridView properly and update the changes made in the database. I think that here my last resort will be looping through each record, data will be updated in the d...

how to jump from editor to explorer window in eclipse(shortcut key) -

Image
Is there a shortcut key to jump from writing the editor to the applet window or console? Believe the picture that I am writing the code and I want to move the project explorer window with mouse usage. Is there a shortcut key for this? Yes, I got the answer ctrl + shift + F7 or ctl + f7

c# - Unable to convert varchar type to byte[] -

"postprint" itemprop = "text"> I have the parameters which has33) I have named the password passwordvalid in the database for the password saved to the crypted_password and the salt ( If you want to compare (string, byte [], byte []) string for plaintextpassword, byte [for cryptedpassword saved] and saved salt and crypted_password and salt attributes varchar type are in the database so my question is how I changed the varchar datatype [] so the byte Can I pass passwordisvalid () to do that? public static bool isPasswordValid (string passwordPlainText, byte [] savedSaltBytes, byte [] savedHashBytes) {byte [] Array1 = GenerateSaltedHash (passwordPlainText, savedSaltBytes); Byte [] array2 = SavedHashBit; if (array1.Length! = Array2.Length) returns incorrectly; (int i = 0; I & lt; array1.Length; i ++) {if (! Array1 [i] = array2 [i]) return false;} return true;} Any help would be appreciated. The varchar element should map back to the string from th...

how to upload image through python-eve to some external storage server e.g. S3? -

I know we can now upload / post a media type field in the python-eve REST-API framework. and it will be stored in mongodb . Is there any way we can change the storage of those media? Such as a remote storage server eg Amazon S3 ? So that we can store the image's URL in mongodb instead of just the whole picture? While storing on grids, you can provide your own MediaStorage Something similar does this: eve.io MediaStage Class from Media Import: AmazonS3MediaStorage (Mediastorage): "" Your Real Execution "" "App App = EV (Media = Amazon S3 Media Storage) If __name__ == '__main__': app.run () check jobs See the actual class for the actual class and / or reference for the details of the investigation.

android - How to stop other images to move while dragging of one image -

In my application, I am able to overlap images with each other, when I draw an image from the group of images to the left And the correct pictures are also moving on the screen. How to restrict it, below is my code int card [] = {R.drawable.c1, R.drawable.c2, R.drawable.c3, R.drawable.c4, R Drawable.c5, R.drawable.c6, R.drawable.c7, R.drawable.c8, R.drawable.c9, R.drawable.c10, R.drawable.c11, R.drawable.c12, R.drawable C13}; Image view [] images = new image view [cards.length]; For (int i = 0; i You have a small snippet to go to i have some images Added to layout . Drawing is done in canvas for better performance of dragging. You just need to handle layout parameter update MotionEvent.ACTION_UP event: private image view [] images; Private boolean mDragging = false; Private Reit mImageRect = New Rect (); Int MX = 0; Int ME = 0; Private bitmap ambitmap; Private image view mImage; @ Override Public Boolean On Touch Event (Motion Event Eve) {Switch (Evoke Action)} {Case ...

c# - Pass multiple params array into method -

मेरे पास इस फ़ंक्शन के साथ एक जेनेरिक रिपोजिटरी है: सार्वजनिक आभासी IEnumerable & lt; TEntity & gt; पृष्ठ = 0, पैरामीटर अभिव्यक्ति & lt; टीएनटीटीआई, बाल & gt; & gt; [] फिल्टर) {IQueryable & lt; TENTity & gt; प्राप्त करें (Func & lt; IQueryable & lt; TEntity & gt ;, IOrderedQueryable & lt; TEntity & gt; क्वेरी = डीबीसेट; अगर (फिल्टर! = नल) {foreach (फ़िल्टर में var z) {query = query.Where (z); }} यदि (orderBy! = नल) {वापसी आदेशबी (क्वेरी) .ओलिस्ट (); } Else {return query.ToList (); }} मेरे एक नियंत्रक में मुझे भी क्लाउज़ का उपयोग करने की ज़रूरत है इसलिए मैंने नया वर्ग DeviceInstanceRepository बनाने का निर्णय लिया जो कि GenericRepository और नया GetFiltered विधि बनाएं और मुझे ऐसा कुछ मिला: सार्वजनिक IEnumerable & lt; DeviceInstance & gt; GetFiltered (Func & lt; IQueryable & lt; DeviceInstance & gt ;, IOrdered क्यूबएबल & lt; DeviceInstance & gt; & gt; आदेश बाय = नल, पृष्ठ = 0, ** क्याटिप्प ...

php - pdf generation using phpexcel in windows -

I am generating PDFs and preparing Excel reports using the phpexcel library. Everything works well in the Ubuntu system, but the PDF system does not generate the PDF file, only the excel file is created. (Empty PDF is generated). Is there a memory barrier in PDF that is generated in PDF ... If so, what is the solution? Try entering this row in your code $ ObjWriter = PHPExcel_IOFactory :: createWriter ($ objPHPExcel, 'Excel2007'); $ ObjWriter- & gt; Save ('php: // output'); Please take a look at this link. Maybe it can help you ..

javascript - How can i print custom message on bootstrap methods -

When I click on a button "click me" it changes to "loading" and it After loading, "loading is complete". How do I change this text from "Save" and "Fully Loading" to "Loading" for "Successfully Saved"? What do you want with the link & lt; Script type = "text / javascript" & gt; Click ($ ("# MyButton") (function () {$ (this). Button ('Loading'). Delay (1000) .Q (function () {$ (this). Button ('Full' ); $ (This) .dequeue ();});}); }); & Lt; / Script & gt; & Lt; Div class = "bs-example" & gt; & Lt; Button type = "button" class = "btn btn-info" id = "mybutton" data-full-text = "loading is complete" autocomplete = "off" & gt; Click me & lt; / Button & gt; & Lt; / Div & gt; Below the code you have the following: & lt; Button type = "button" class ...

php - gplus authenticate a client-side user before submitting to my web app -

This is more than a process question question in an error code, please kindly please if I posted to the wrong place. I have successfully authenticated a jeepless user client-party so that the browser can create a Google ID to use for me. Now I want to post some data on my website as a user ID from that ID but I want to secure it which means that I am not able to post someone on your web app with someone else's Jolly ID I want (it should be authenticated user at that time) Should I install the PHP Server Sidek SDK and use it? If this is the case, how can I merge client-side data with it? Thank you You are absolutely sure about obtaining an ID in a safe way It is difficult to clone it so it is difficult to clone. There are two main options, both properties of authResult object that return to the signed callback: Send 'code' to the server. It is part of the OAuth 2.0 flow, and can be exchanged on the server side for an access token. With that you can create ...

c# - Input string was not in a correct format String to double [] [] array -

I know there are more formulas on this topic, but none of these really helps me. I will provide the whole code: Namespace console application 1 {public static class load {public static double [] [] from file (string path) {var rows = new List & lt; Double [] & gt; ); Forehack (fernline in file. ReadLine (path)) // Here are the lines of error. Add (line split (new [] {'}}. Select (double. Purse) .oere ()); } Return Lines .ORA (); }} Public class program {static zero main (string [] args) {string cestain = @ "e: \ vstup.txt"; Double [] [] innput = load.from (cestain); String cestaout = @ "e: \ vystup.txt"; Double [] [] ooutput = load. From cestaout; // CRE A TE a neural network var network = new Basic Network (); Networks Adler (new basic layer (empty, truth, 2)); Networks Adler (new Basic Layer (new activation signmide (true), 3)); Networks Adler (new basic layer (new activation signmide (), incorrect, 1)); Networks Structure final form structure...

node.js - Nodejs - SPDY push on request error -

I'm having trouble launching my node app I get "type error": method 'undefined' error Here's my code: spdy.createServer (credentials, app) .listen (app.get ('port)), function (rik, ridge) {res.push} ('Public / js /bootstrap.min.js', {' content-type ':' application / javascript '}, function (mistake, stream) {stream.end (' Warning (Hello from push stream! ')') ;}); Res.push ('public / js / jquery.min.js', {'content-type': 'application / javascript'}, function (mistake, stream) {stream.end ();}); Res.push ('public / css / bootstrap.min.css', {'content-type': 'text / css'}, function (mistake, stream) {stream.end ();}); // Main response body type and finish stream res.end ('Hello World!'); Console.log ('Express HTTPS listening on SPDY server port' + app.get ('port'));}; I am running SDPY version 1.19.2 and NodesJS version 0.10.25. Dependin...

javascript - Catch keypress document wide and start typing in search box -

I want to capture all the key presses on my webpage so that when you start typing text, the search box (input) jquery Can be: var $ search = $ ("#search"); $ (Document) .on ("keydown", function (e) {if (! $ Search.is (": focus")) if (e.he! = 9 & amp; e.which! = 13) $ search Focus ();}); If the focus has already been set, then the .focus () function will not be called to set the focus on the input field. If the user pressed the tab or enter key, then the input field will not be selected! Accessibility If someone tries to use your mouse without a mouse (just with the keyboard), then navigate anywhere will not be able to. You may have to consider using additional techniques like HTML.

c++ - Visual Studio 2010 Debug Visualizer for boost uuid -

There are debug visualisers for Visual Studio 2012 and Visual Studio 2013 on this link. Debug this link on Visual Studio 2010 for Visual Studio As you can see, no debug visualizer is set to promote: UUID: UUID Visual Studio 2010. I'm working on Visual Studio 2010, how can I define debug visualizer to promote UUID on Visual Studio 2010? How to make lists in VisualStudion 2010. This set is described in the Basic C + + Debugger Visuelers for MSVS 2005/2008/2010 .

Java NIO Pipe and ByteBuffer -

मैं पाइप कुछ ByteBuffer को एक थ्रेड में IO1 ) को दूसरे में ( IO2 )। निजी इंक बफर आकार; निजी बूलियन है; रिकॉर्डिंग; निजी थ्रेड IO1; निजी धागा IO2; निजी बाइटबफर बाइटबफर 1; निजी बाइटबफर बाइटबफ़र 2; निजी पाइप पाइप; निजी पाइप। सिंक चैनल स्चैनल; निजी पाइप। स्रोतचैनल स्रोत चैनल; ByteBuffer1 = बाइटबफ़र.ऑलोकेंट डायरेक्ट (बफर साइज़); ByteBuffer2 = बाइटबफ़र.ऑलोकेंट डायरेक्ट (बफर साइज़); // पाइप का एक उदाहरण बनाया गया है {पाइप = पाइप.ओपन (); SkChannel = pipe.sink (); SourceChannel = pipe.source (); IO1.start (); IO2.start (); } पकड़ (IOException ई) {e.printStackTrace (); } - IO1 = नया थ्रेड (नया रननाबल () {सार्वजनिक शून्य रन ()} isRecording = true; recorder.startRecording (); {आइए पढ़ने के लिए, जबकि (आईआरईसी रिकॉर्डिंग) {// बाइट बफर 1.क्लायर (); पढें = रिकॉर्डर। रीड (बाइट बफर 1, बफर साइज़); अगर (ऑडियोरेकॉर्ड। "======== आईओ 1", स्ट्रिंग.वल्यूओफ़ (पठन)); // यह लगभग 20 गुना / सेकंड}} रिकॉर्डर। स्टॉप ();} पकड़ (अपवाद ई) {ई.प्रिंटस्टैक्सट्रेस (); }}}); skChannel.write...

android - update sqlite table through attach db very slow -

I have a main SQLite-database (many data) and updated socket-database on an Android device. Want to update). I would like to update the table in the main DB with the table data (the same structure) in the update-db with my Android app - it means to destroy all the rows in the main in the update. - Mainly incorporate everyone with updates. My approach is to: attach 'to update' path updatetable to remove from mytable where id (Choose ID from updateb). Mytable) Insert in mytable * Select * from mytable Delete and Insert are very slow (in my opinion) Is there a way to do it fast? Use batch insert to insert large amounts of data Here is the code: In your database: Public Zero Batch Industrial (String SQL, Arreelist & lt; String [] & gt; Value) {SQLiteDatabase db = getWritableDatabase ( ); Db.beginTransaction (); SQLiteStatement stmt = db.compile Statement (SQL); For (int i = 0; i & lt; values.size (); i ++) {string [] record = values.get (i); For ...

Dynamics CRM Detect if Delete Message is Cascade Delete -

I have a custom workflow activity that runs when a custom unit is deleted. I have to find out whether the message is to delete a fundamental deletion or remove the cascade from the parent unit (originality). I have found that even when a waterfall is removed, the original unit is in existence. What can I find out and see if the result of the removal is to remove the cascade? I need to get this information because the parent unit is updating the unit when it is removed - it should be removed only when there is no result of deletion, otherwise there is a SQL error. It is probably due to the fact that the workflow is trying to update the records being removed in the transaction. Edit Tanguy T, but it was not resolved. I believe you can see the ParentContext member of the workflow context. If this is empty or the message of the parent is not equal to the removal - this means that it is not to remove the cascade. Check it out.

c# - An explicit conversion during while passing arguments -

मेरी विधि पैरामीटर अभिव्यक्ति & lt; Func & lt; TEntity, IQueryable & lt; TEntity & gt; & gt; & Gt; [] शामिल है के रूप में पैरामीटर्स और बाद में उन्हें इस तरह से उपयोग करता है: IQueryable & lt; TENTity & gt; क्वेरी = डीबीसेट; अगर (शामिल! = नल) {foreach (शामिल में var z) {query.Include (z); }} हालांकि इस कॉल में फेंका गया त्रुटि के कारण मैं इस फ़ंक्शन को कॉल करने में सक्षम नहीं हूं: जाओ (w = & gt; w डिवाइस, w = & gt; w.DeviceUsage)); त्रुटि 10 "मैजिकज़। मॉडेल्स.डिवाइस" से "System.Linq.IQueryable" टाइप करने के लिए परस्पर रूप से परिवर्तित नहीं किया जा सकता है। एक स्पष्ट रूपांतरण मौजूद है (क्या आप एक कलाकार को नहीं छोड़ रहे हैं?) उन दो पैरामेट को पास करने के लिए कॉल को कैसे संशोधित करें? अभिव्यक्ति & lt; Func & lt; TEntity, Object & gt; & gt; - वे शामिल किए गए नेविगेशन का चयन करने के लिए उपयोग की जाती हैं संपत्ति Em> उस इकाई से जिसे आप पूछताछ कर रहे हैं: पैरामीटर अभिव्यक्ति ...

c# - DataContractJsonSerializer : unserializing an object which can be a string or an object -

I currently get some data from an API which sends me an array Object "Paramaze" first element contains a string But an object is second. My data contract looks like this: [DataMember (name = "parametry")] string absolute; [Datamember (name = "parameter")] param jusan absolute 2; (ParamsJson is just a string of datamail). I have read Jason Net or Newton can solve my problem, but I really want to solve without adding a new library. I can find a solution that will work. Instead of a double declaration, it is better to list all types in a calculation.

sockets - zmq send with NOBLOCK raise Resource temporarily unavailable -

This code will temporarily increase the unavailable resource when calling with Noble: context = Zmq reference () sender = reference signal (zmq.PUSH) sender.bind ('tcp: // *: 15556') sender. Send ('KeEpAliv', zmq.NOBLOCK) # This line will throw exception # sender.send ( 'Kepalive') # This line will be fine after reading After reading, I did not get any signal for this. But explained this flag. Python wrapper raise zmq.error.Again if the underlying C API returns EAGAIN . Now, you should follow the documentation, which states: ZMQ_NOBLOCK Specifies that the operation should be performed in non-blocked mode. If the message can not be queued on the socket, the zmq_send () function will fail in the EAGAN from an anonymous set. In addition, in the Errors section: EAGN - non-blocking mode was requested and message can not be sent at this time. Now, why is not it possible to send a message? On the description page we can read the followi...

java - Passing values to spring bean programmatically? -

मेरे पास वसंत सेम नीचे है। सार्वजनिक वर्ग कर्मचारी 2 {निजी इंट आईडी; निजी स्ट्रिंग का नाम; निजी डबल वेतन; सार्वजनिक कर्मचारी 2 (इंट आईडी, स्ट्रिंग का नाम, डबल वेतन) {this.id = id; This.name = name; इस.salary = वेतन; अब मैं स्प्रिंग कॉन्फ़िगरेशन फ़ाइल में कॉन्फ़िग के नीचे है। & lt; bean id = "emp2 "वर्ग =" com.basic.Employee2 "& gt; & Lt; constructor-arg नाम = "id" मान = "" / & gt; & Lt; constructor-arg नाम = "नाम" मान = "" / & gt; & Lt; कन्स्ट्रक्टर- आर्ग नाम = "वेतन" मान = "" / & gt; & Lt; / सेम ​​& gt; अब मैं गतिशील कोड के बाद से ऊपर के मानों को नहीं मान सकता। अब मैं स्प्रिंग बीन प्रोग्रामेटिक रूप से नीचे कोड का उपयोग कर रहा हूं। कर्मचारी 2 एएमपी = (कर्मचारी 2) applicationContext.getBean ("emp2"); Div class = "post-text" itemprop = "text"> जब आप सेम लुकअप करते हैं कर्मचारी 2 emp = (कर्मचारी 2) applic...

.net - How to convert the below 2 foreach nested loops to linq query? -

How to change the 2 foreach nested loop under the LINQ query? It takes about 10 seconds to execute this loop, which contains approximately 610 items. Apart from this, can any update be made in the lines of code given below so that the performance can be improved and slightly improved and the performance time can be reduced? Code: Forcha (Virus Map in InformationMap) {var testItem = map.TestItem; Var testInViews = TestviewMaps; Var testWorkbenchItem = map.TestWorkbenchItem; String TestLinkType = string.Empty; WorkItemLinkCollection testLinkedWorkItems = testItem.WorkItemLinkHistory; If (affiliates! = Null & amp; link worksite.Count & gt; 0) TestLinkType = Linked WorkItem [0] .LinkTypeEnd.LinkType.ReferenceName; Else if (testItem! = Null) TestLinkType = testItem.Store.WorkItemLinkTypes.LinkTypeEnds ["Parent"] LinkType.ReferenceName; Foreach (var testViewMap in testInViews) {if (! String.IsNullOrEmpty (TestLinkType)) {var testLinkName = TestLinkType; Var testchi...

php - Insert into multiple tables at once -

I am trying to insert data in several tables, but I can not get it to work. There is a project table and a tag table when I create a new project, I have to go project data into the project table and I post it on the same tag to go to tag template. I have no idea how to do this. In addition to this, the tag table uses Project_ID from the project table. ID is set with auto increment How can I use ID from the project table in the tag table? The query I am using to include in the project table: values ​​('$ title', '$ summary', '$ content', '$ time' 'Project_pics / $ image_name');); $ q1 = mysql_query ("Insert in Tab 1"); $ Id = mysql_insert_id (); $ Q2 = mysql_query ("Tab 2 values ('$ Id') "

matlab - Splitting a string into various bits -

I have a string that looks like this: substring = 'Xmole (1) = 0.0xmole (2) = 1.0 arho (1) = 2343rho (2) = 2343 ' I need to split it into: Xmole (1) = 0.0 Xmole (2) = 1.0 rho (1) = 2343 rho (2) = 2343 Is this an easy way to do this If your number is always in the form of your example, that is, the number and possibly a decimal point (and for example "1.0e-3") Not in): ind = regexp ( Pastring, '= [\ d.] +', 'End'); Results = MAT 2SL (Substring, 1, [IND (1) Difference (Ind)]). '; variable result Each cell has a cell array with one string: result = 'xmole (1) = 0.0 '' Xmole (2) = 1.0 '' rho (1) = 2343 '' rho (2) = 2343 '

WPF how to make datagrid column width to detect largest item? -

That's why I have a Detagrid have been working with the set that I follows property width: & lt; DataGridTemplateColumn Header = "Country" width = "{Binding Path = RealWide, ElementName = Grid}" IsReadOnly = "True" /> Now display column width is really suited for the large object, but only if it is shown Indeed grid width grows when I larger items than appear before To be scrolled. How can I find the largest item in the archive and always optimize the width of the grid, even if it has not been displayed yet? I think you have ScrollToEnd method will have to wait until Datagrid load and later Datarids Scrollviewer Call.

Python (Django) get and encode params from url -

मेरे पास इस तरह एक क्वेरी स्ट्रिंग है: main.php? Location =% D0 % E0% E7% E4% EE% F0% FB और पृष्ठ = 04rent & amp; way = 1 & amp; filtr = 1 जब स्थान मूल्य प्राप्त करने की कोशिश कर रहा हूं: स्थान = अनुरोध। GET ['स्थान'], मेरा मान u '\ ufffd \ ufffd \ ufffd \ ufffd \ ufffd \ ufffd \ ufffd \' मुझे एक ही अक्षर पाने के लिए क्या करना चाहिए क्वेरी स्ट्रिंग से? क्वेरी स्ट्रिंग में एन्कोडेड सही वर्णसेट रखें और पुनः प्रयास करें।

sql - Combine multiple rows in single row -

I'm new to SQL Server and I'm trying to combine more than one line in a row but I I'm not able to. Can anyone help me? Input: id | Red | Buy | BSW ------------------ ------------------ 1328 Faucet Zero 0.05 1328 Faucet 0.06 Faucet 1328 0.01 Faucet Faucet 1328 0.05 Faucet faucet 1329 Faucet faucet 0.05 1329 Faucet 0.05 faucet 1329 0.05 Faucet faucet Output ID | Red | Buy | BSW ------------------------- ----------- 1328 0.01 0.06 0.05 1328 0.05 NUll NULL 1329 0.05 0.05 0.05 Delete the data so that to remove SUM () conflict. Try this type of SELECT id, sum (Isnull (ID, ID according to ID), (amount, (purchase, 0)) over (division according to ID by ID), Yog (Isol (BSW, 0)) Over (ID according to partition) ID number 1 By ID

java - How to use single sessionFactory for hibernate Intercepter -

I'm experimenting with the hibernate interceptor (Hibernate 4.x). I want to do some operations to save the method of session. So I have the following methods: onSave () // When the saved operation is preformed Problem: In postFlush () I want to work to save. So my control got stuck in the loop because when my session was being called, the EmptyInterceptor's onSave () and postFlush () method was called to block the saved operation. To overcome this problem, I used two session factories for 1 session operation (save, update etc.) and 2 for hibernate intritor but I am concerned that How can I exercise this problem with a session session ?? Public class audiologic interceptor provided an empty interceptor { public boolean onSave (Object unit, serialable id, object [] state, string [] property name, type [ ] Type) {return false; } // is committed after the database is committed to the public Zero Postflush (Iterator Itater) / / / here with the session. I want to ...

html - Custom CSS gallery -

Image
I want to create a photo gallery for one of my projets, but I can not get it. What I want is something like this: I do not know how many photos will be but basically what it will be: - Put photo first in photo_div # 1 - Insert second in # 2 - goes to new line - Insert in # 3 - Insert 4 # 4 - Go to the next column and enter the first row - 5 in 5 - etc. What I have made so far is the following code: & lt; Div id = "scroll_container" & gt; & Lt; Div id = "photo_0" square = "div_photo" & gt; & Lt ;! - Inside & Content - & gt; & Lt; / Div & gt; & Lt; / Div & gt; and CSS code: scroll_container {height: 100%; Width: 550px; Overflow-x: scroll; Overflow-y: hidden; } .div_photo {float: left; Width: 250px; Height: 250px; Limit: 1px solid black; Margins: 0 5px 5px 0; Status: Relative; Display: inline-block; But But what I can get is a gallery with two lines. Can you help me solve it? Thanks I...

apache - Apache2 not installing /etc/apache2 ubuntu 12.04 -

I have recently been trying to recover from the problem of upgrading to apache2.4 and php 5.5. I uninstalled apache2 and removed the / etc / apache2 folder, but when I install apache2.2, it will be / etc / apache2 folder Not creating, so does not start. as the following sudo apt-get remove - -purge apache2 apache2 -Tits sudo apt-get install - reinstall apache2 apache2-utils

python 3.x - execute multiple functions in parallel -

I have a large number of functions and each of them should load the URL from the list and perform some operations. I need all the tasks to do this in parallel if it is possible and each function should load the URL from the list. I have some code here, but I'm not sure what it does or what I do, can it be simplified? Thanks Class Multi (Object): # ------------------------------- - -------------------------------------- def __init __ (self, urls_func1, urls_func2): " "Start the class with the list of" Urls "" self.urls_func1 = urls_func1self.urls_func2 = urls_func2 # -------------------------- - ------------------------------------------ def func1 (self, url , Que): "Do something" que.put (result_func1) # ----------------------------------- - --------------------------------- Deaf Fan 2 (Own, URL, Qi): "Do Something" Quetap (Result_func2) # --------------------------------------------- - ------------------------ DEF (self): For ...

how to submit json file in sencha touch in http post multipart? -

मैं jmson फ़ाइल फॉर्म sencha स्पर्श को अपने टोमर्ट सर्वर पर http पोस्ट का उपयोग करना मल्टीपार्ट लेकिन मुझे नहीं पता कि कैसे करना है? क्या कोई मुझे कुछ विचार या उदाहरण दे सकता है धन्यवाद आप यह jQuery का उपयोग कर सकते हैं। var request = नया फॉर्मडाटा (); $ .ईईसी (संदर्भ.प्रोटोटाइप.फ़ाइलडेटा, फ़ंक्शन (आई, ओबीजे) {request.append (i, obj.value.files [0]);}); Request.append ('कार्रवाई', 'अपलोड'); Request.append ('id', response.obj.id); $। एजेक्स ({प्रकार: 'पोस्ट', यूआरएल: संदर्भ.controller, डेटा: अनुरोध, प्रक्रिया डेटा: गलत, सामग्री प्रकार: गलत, सफलता: फ़ंक्शन (आर) {console.log (r); // यदि (त्रुटियाँ! = Null) {} और context.close ();}, त्रुटि: फ़ंक्शन (आर) {चेतावनी ('jQuery त्रुटि');}});

html - User string containing MDDSJS -

I have a website that submits a form, but when IE 8 + submits it twice, This checks the user string to determine whether it needs to report an error. I got an error today because the user string in the "MDDSJS;" The complete user sting was "Mozilla / 5.0 (Gecko like Windows NT 6.3; WOW64; Trident / 7.0; MDDSJS; rv: 11.0)". I have searched for MDDS and all I can find is that this user is in the string, but that does not mean it. Does anyone know what "MDDSS" means? Did another look for it and finally found that it was an OEM token for the Dell device

objective c - Memory Management ios7 -

इस सवाल का पहले से ही एक उत्तर है: 10 उत्तर मेरे पास निम्न कोड है: - (IBAction) HeyCount: (UIButton *) प्रेषक {NSString * strr = [[NSString alloc] initWithString: @ "हाय वहाँ"]; Self.string = @ "" 78 9 "; ओहयाह = @ "456"; एनएसएलॉग (@ "ओहयाह की संख्या को बनाए रखना: स्ट्रिंग के साथ [% d]: [% ld]", [ओहयाह को बनाए रखने की संख्या], (लंबे) [ओहयाह पूर्णांक वैल्यू]); एनएसएलॉग (@ "तार की संख्या को बनाए रखने: [% d] स्ट्रिंग के साथ: [% ld]", [strr retainCount], (लंबे) [strr integerValue]); } और उपरोक्त कोड के बाहर डाल दिया है: ओहयाह की संख्या को बनाए रखना: [- 1] स्ट्रिंग के साथ: [456] Strr: [- 1] स्ट्रिंग के साथ: [0] ओहयाह की घोषणा। में है फ़ाइल NSString * ohYeah; मैं एआरसी का उपयोग नहीं कर रहा हूँ। आप में से कोई भी यह समझा सकता है कि दोनों तार का -1 और के साथ किसी भी वस्तु को एक्सेस करना को बनाए रखने कोड> -1 क्रैश नहीं होना चाहिए? मुझे लगता है कि संकलक चतुर है और बनाता है आपके दिए गए कोड से...

c# - Why is snapshot isolation lavel greater than serializable? -

यहां जो डीकंपलर दिखाता है: सार्वजनिक एन्यूम अलगाव स्तर {अनिर्दिष्ट = -1, कैओस = 16, ReadUncommitted = 256, ReadCommitted = 4096, RepeatableRead = 65536, Serializable = 1048576, स्नैपशॉट = 16777216,} लेकिन सीरियलाइज़ेबल ताले डेटा इस प्रकार से अधिक गारंटी प्रदान करता है स्नैपशॉट की तुलना में संगतता सही है तो स्नैपशॉट के मूल्य के लिए क्या कारण अधिक है? अलगाव का स्तर " प्रत्येक आइटम केवल एक अलग प्रकार के अलगाव का प्रतिनिधित्व करता है। इसके लिए कि का मतलब आपको दस्तावेज़ को देखना चाहिए। ये वास्तव में 4-बिट स्पेकिंग्स पर बस थोड़ा-सा झंडे हैं I आंतरिक क्रियान्वयन के विवरण के अलावा, किसी विशेष अर्थ का उपयोग मूल्यों के लिए नहीं है।

php - PChart Right axis to show labels for specific values -

Image
I have an air chart shown below with working with current, lower and higher values. What would I like to add but I can know this: I need the right hand scale of the plot which will show the air force. I think this will be set as a label for a specific value. In this case the label for force 1 should be consistent with wind speed 1 In line with the wind speed 4 Labels for force 3 should be consistent with wind speed 7 Labels for force should be consistent with wind speed 11 force 5 Should the label be consistent with wind speed 17 Can I create AI axis anyway, which shows a specific label on a specific value? Something like this is done: but where numbers reach the right values ​​ Here my work has been worked. I was making a particle calculation graph: $ MyData-> Joint Points (array (7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24), "ISO"); $ MyData- & gt; SetSerieOnAxis ("ISO", 1); $ MyData- & gt; Setexisname (1, ...

.net - add an image and it span in multiple pages using itextsharp -

How can I add a large image, which is spread across multiple PDF pages using iTextSharp. I have an image which is higher than the PDF page height and due to this, the image is not fully displayed in the PDF page, the last part of the image is missing. Please check that it resolves your problem: Document oDocument = new document (); ODocument.Open (); PDFPTables table = new PDFPTable (1); Table Legislative percentage = 100; PDFPCL C = new PDFPCL (image, true); C.Border = PdfPCell.NO_BORDER; C. Padding = 5; C.Image.ScaleToFit (750f, 750f); / * New line * / table.edsel (c); // & lt; - Add cell to table oDocument.Add (table); I hope that using PDfPTable will solve your problem.

c# - Calling a Button's method with a CommandArgument -

I'm not sure the title is best understood. I am trying to call a method that is usually accessible by direct clicks from the front page. Although in a special example I need to call this method once, but in order to use this method, to use the command commandarm, I need to get command command of this fake button call. Usually call such a method Make_Profile (this, new EventArgs ()); or Make_Profile (empty, empty); I have tried to call a method like this: address page (this, new eventArgS ("CommandArgument", "1"); But I do not think I understand this code well. In the method I call: argument = ((Button) sender) command command; if (string.IsNullOrWhiteSpace (argument)) {numba = 0;} else {numba = Convert.ToInt32 (logic);} hopefully That you can see what I'm trying to get from the button. Make_Profile (empty, empty); The job is OK.

ios - Set up a UISearchDisplayController for a UITableViewController without a UISearchBar -

I think the only way to create a UISearchDisplayController is also to build UISearchBar on my UITableViewController . However, I do not want to use UISearchBar , and want to start searching through it instead of pressing a button Is this possible? I tried to activate UISearchDisplayController by pressing the button: - (zero) pressed the search button: (ID) sender {[manually . Search Display Controller Set Active: Yes Animated: Yes]; } This "works", but searchDisplayController shows that there is no UISearchBar . (It is evident). I just finished setting hidden fields in no more yes The given search display controller has been shown and discarded.

javascript - Read all dropdown box values in JQuery -

I have a dropdown box in an MVC 4 view. When the value changes in the dropdown box, I want to read all of the selected values. Each selection consists of 3 items. First of all: ID, second: The value that the user sees on the form and on the third: the path of a file is. Everything works fine, but I can not read the template path. How can I use jquery to read the selected user template pad I know how IDs and selected values ​​can be read, but I want to find a way to read the path. Creates a SelectList used in my controller view: ViewBag.TemplateList = new selection list (DB templates list), "Template ID", " Template "," templatepath "); Uses the scene selection list and populates the dropdown box: @ html.DropDownListFor (model = & gt; model.TemplateId, IEnumerable as ViewBag.TemplateList & lt; SelectListItem & gt ;, "- no template -", new {@id = "TemplateChoice"}) using jquery with me There is a javascript...

visualforce - salesforce apex refresh VF pageblock section -

I am trying to refresh the page block section based on the value of a selected list. Here is VF: & lt; Top: Page Block Features & gt; & Lt; Apex: selectList size = "1" value = "{! ReasonCode}" & gt; & Lt; Top: Select option value = "{! ReasonCodes}" /> & Lt; Top: Action Support Event = "onchange" rerender = "a" /> & Lt; Apex: Action Support Event = "Incomplete" Action = "{! Disapproved Reasoncode}" render = "Order" /> & Lt; / Supreme: selectList & gt; & Lt; / Supreme: pageblockSectionItem & gt; & Lt; / Supreme: pageBlockSection & gt; & Lt; Top: Page BlockSign ID = "Order" sung = "{! IsAcceptedRC == true}" & gt; & Lt; Highest: Output Label Value = "Order Number" = "odNum" /> & Lt; Apex: inputText id = "odNum" value = "{orderNumber}" /> & Lt; / Supreme: page...

php - Any way to get all rows of a table where the foreign key matches the primary key using only models rather than accessing the database directly? -

I have two models: Users and Lessons Lessons Users_ID are linked to text for users in a lesson through foreign keys. I want to say "give me everything for user 8", but the only way I am able to accomplish this is db class $ lessons = DB :: table ('lesson') - & Gt; Where ('user_id', '=', 8) - & gt; Find (); Is there any way to do something like this? $ lessons = lesson :: all () - & gt; Where ('user_id', '=', 8); or (even better) $ lessons = User :: find (8) -> lessons (); Just wondering because the latter two ways make more sense. just thinking! You can do something like this: $ Lessons = Lesson :: where ('user_id', 8) - & gt; get (); // '=' is optional or user with text: $ userWithLessons = User :: with (' Lesson ') - & gt; It seems (8); In addition to User :: Search (8) -> Lessons; will work, but curious loading (with ' ' ('lesson...

sql server - SQL Grant Permission to SP_SEND_DBMAIL -

So I want to give permission to send a domain user access DB email. I've given access to system roll database malurizerroll using exec sp_addrolemember 'DatabaseMailUserRole', 'DOMAIN \ User' . The strange thing is that when I impersonate Login (as login = login = 'DOMAIN' user), it now works. However, when I impersonate USER (as EXECUTE USER = 'DOMAIN \ user'), access failure is not denied. What should be done to allow urls to enter? I do not think you can do EXECUTE AS ("USER" in the description of the argument) From the documentation: Specifies the context to impersonate A user in the current database is The scope of impersonation is restricted from the current database. A reference switch for the database user does not receive that user's server-level permissions. (emphasis my) because this role is in MSDB, which constitutes a permission outside the database and does not promote it in this way. what are ...

unix - Nested if in shell scripting -

I want to write a script that takes 1 command line agreement (a directory) and then points to 2 numbers , Then print any file (each on a separate line), which is the size between that number, this is my script echo -n "Enter the first number:" an echo -N Read "Second, enter a larger number:" If read, [$ b -lt $ a] then resonates' first number Should Ota In 'else files $ $ echo $ 1 Echo following $ a and $ b bytes' Ls $ 1' if [-f $ var] If size = 'ls -l $ var |' '{Print $ 5}' 'If [$ size -l $ b & amp; $ Size -ge $ a] Then resonance is $ var $ size bytes fix The problem is that after I enter the numbers, it will print "files ..." and then some And no, besides, I use V to edit it, but the color of the last three rows is not quite right (the color should match the "fi" first but this is not). Can anyone show me what was wrong? Thank you. Your immediate problem is that you used single quotes, howe...

file - java.io.StreamCorruptedException: invalid stream header: 00000001 Simple Project -

My problem is that my project (a simple inventory in which the items are serialized in a folder and then deserialized) is a " Java.io.StreamCorruptedException: Invalid Stream Header: 00000001 "When I tried to deserialize information I had no problem before; However, when I manually delete one of the serialized files with Finder (MAC), then this is when the exception was thrown. My code for Deserializing is: Private Zero compileInventory () {// Run through the text file and inventory inv = new & lt; Item & gt; ArrayList (); File f = new file (local); File [] list = f.listFiles (); Inv.clear (); If (f.exists ()) {for (file n: list) {try {fileInputStream fileIn = New FileInputStream (n.getAbsolutePath ()); ObjectInputStream = In New ObjectInputStream (fileIn); IN.Add ((item) in.readObject ()); In.close (); FileIn.close (); } Hold (IOException i) {i.printStackTrace (); Return; } Grip (Klassnotfound exception c) {System.out.println ("Item category not found"...

ios - Filtering Out Inappropriate Words from a Chatroom -

Actually, I am posting a function below which posts a chat post in the chat room (other course work Calling) This works perfectly, however, my app was rejected by Apple because of the potential of inappropriate content in my chat room, so, by creating an array of inappropriate words, for loop through that array User's post using * based on the length of the words decided to filter out inappropriate content by searching for an inappropriate term for the message (under the variable message) and transferring that word with that amount. Below is my code, but I'm missing some stuff. Please tell me whether to add code, or it's a better way to do it. Here is my code (Note: Blacklist is my incomplete word): - (zero) displayChatMessage: (NSString *) Message by user: (NSString *) Username {int i = 0; Int goodJobRunCount = 0; (I = 0; i & lt; [blacklist calculation]; i ++) {nssting * car = [blacklist objectitancex: i]; NSRange searchResult = [Message limitoffstring: car]; ...

java - Deserialize a JSON response to multiple objects -

मुझे एक जेसन प्रतिक्रिया की deserialize की आवश्यकता है प्रतिक्रिया: {गति: 40, दूरी: 20, समय: 3} में 3 अलग-अलग ऑब्जेक्ट्स, जो कि कक्षा स्पीड लागू होता है {इंट गति; } कक्षा दूरी लागू {इंट दूरी; } क्लास टाइम औज़ बेस {इंट टाइम; } यह है जो मैंने अभी तक किया है, @ jsondeserialize (= customdeserializer.class का उपयोग करके) वर्ग प्रतिसाद औजारों को आधार {...} कक्षा customdesializer JsonDeserializer का विस्तार & lt; सूची & lt; बेस & gt; & gt; {@ ओवरराइड पब्लिक लिस्ट & lt; बेस & gt; Deserialize (...) {// पढ़ें जेसनपर्सर // स्पीड, समय और दूरी के लिए वस्तुओं का निर्माण // वापसी}} क्लास प्रसंग {सार्वजनिक सूची & lt; बेस & gt; कनवर्टर (..) {ऑब्जेक्टमैपर मैपर = नया ऑब्जेक्टमापर () सूची & lt; बेस & gt; पैराम्स = ऑब्जेक्टमैपर। रीड वेल्यू (जेसनवैल्यू, न्यू टाइपराइफरेंस & lt; लिस्ट & lt; रिस्पांस & gt; & gt; () {}); वापसी परम; }} मुद्दा: मेरी कस्टमसेरियलाइज़र को कभी भी कॉल नहीं किया जा रहा है मैंने इसे डीबग बिंदु के द्वारा सत्याप...

python - why is mechanize not downloading the full page? -

I am using mechanisms to link and I am getting all employees of a fixed company. The results of the employees are missing out in the middle and I have no idea. Here is my code (My Linden Sign In Notice): import from mechanize browser br / browser (from brs import) br.set_handle_robots (wrong) Br.open ('https://www.linkedin.com/') br.select_form ('Login') br ['session_key'] = yOUR_EMAIL_HERE Br ['session_password'] = YOUR_PASSWORD_HERE response = br.submit () page = Br.open ('https://www.linkedin.com/vsearch/p?f_CC=10667') html = page.read () soup = beautiful (html) text = soup. Vengeance () text = text ncod ("esi", "ignore") fo = open ("website.html", 'wb') fo.write (text) fo.close () This is the response (I recommend downloading HTML and looking at it with a browser): I'm not sure that I have used open work correctly; Anyway, that might be the problem, thanks in advanced! If you have any qu...

random - Is there a somewhat-reliable way to detect that a list of integers came from a common PRNG? -

Actually I'm looking for a detective function, I find it a list of integers (probably between 20 and 100 integers) And let me "yes, 84% chance it has come from a PRNG, I have tested it against the main people, which is the most advanced programming languages", or "No, only 12% chance came from a famous PRNG. " If it (or constraint) helps, then the integer is always 1 and 999 Will f. Is it present? Unless you're ready to break the new ground in number theory, you only know the obsolete It will be able to apply, badly designed or poorly ladled PRNGS is designed to clearly design good PRNG which is what you are trying to do. Random Number Generation is an important part of digital cryptography, so many attempts go into preparing random numbers that meet all known tests. The PRNG profile has a test battery, for example. As a comment, the first two sentences are overstated and only strictly correct for the PRNGs that can be used in cryptography. ...