Posts

Showing posts from September, 2011

java - missing return statement for a for loop to sort numbers from lowest to highest -

यह प्रश्न एक सटीक डुप्लिकेट है: 4 जवाब सार्वजनिक एंटी सॉर्टिंग (Int साइड 1, इंट साइड 2, इंट साइड 3) {int [] xx = {side1, side2, side3}; Int trace = 0; के लिए (int i = 0; i & lt; xx.length-1; i ++) {के लिए (int j = i + 1; j & lt; xx.length; j ++) {if (xx [i] & gt; xx [j] ) {Int save = xx [i]; Xx [i] = xx [j]; एक्सएक्स [जे] = बचाओ; } ट्रेस ++; }} के लिए (int i = 0; i & lt; xx.length; i ++) {int संख्या = xx [i]; वापसी संख्या; }} // अनुपलब्ध रिटर्न स्टेटमेंट त्रिकोण कार्यक्रम के भाग के रूप में न्यूनतम से लेकर सबसे ज्यादा संख्याओं की एक विधि बनाते हुए और यह मुझे एक गुम रिटर्न स्टेटमेंट त्रुटि देता है मुझे नहीं पता कि मुझे क्या याद आ रही है कृपया मदद करे। आपका अंतिम लूप वास्तव में समझ में नहीं आता (Int i = 0; i & lt; xx.length; i ++) {इंट संख्या = xx [i]; वापसी संख्या; } यह हमेशा xx [0] वापस करेगा। क्यों लूप के लिए बिल्कुल भी है? आपको जो त्रुटि मिल रही है वह हो रही है क्योंकि कंपाइलर नहीं जानता है कि लूप के लिए लूप होगा दर्ज किया जाए, त...

sql server - Access form - how to make text field have a control source from a SQL query? -

पृष्ठभूमि मेरे पास दो टेबल हैं: परियोजनाएं कर्मचारी कर्मचारी कर्मचारी का नाम मेरे पास एक क्वेरी है जिसमें मैं अन्य मदों के बीच में एक फार्म का आधार बना रहा हूं: SELECT e.Name प्रोजेक्ट्स से जोड़ें जॉब कर्मचारी और ऑन ई। एम्पायरिआईडी = पी। एम्पायरिआईडी जब मैं इस क्वेरी के आधार पर एक्सेस में एक फॉर्म करता हूँ, तो मैं अपने फ़ॉर्म पर बहुत आसानी से e.Name प्रदर्शित कर सकता हूं क्योंकि यह क्वेरी से जुड़ा हुआ है मेरा वास्तविक उदाहरण इस सरल उदाहरण से काफी अधिक जटिल है। उपरोक्त कार्य केवल पढ़ने-योग्य पूछताछ और अच्छी तरह से तराजू के लिए ठीक है। हालांकि मैं एक स्प्लिटफॉर्म दृश्य का उपयोग करना चाहता हूं और यह बहुत धीमी गति से हो जाता है क्योंकि बहुत से रिकॉर्डेसेट्स के लिए भी बहुत कुछ जुड़ जाता है। मेरे शामिल होने के एक बड़े प्रतिशत को ध्यान में रखते हुए ऊपर की तरह सरल होते हैं, मैं जितना संभव हो उतने लोगों को निकालने का एक तरीका तलाश रहा हूं। फ़ॉर्म पर, ई। नाम पढ़ा जाएगा केवल और अद्यतन-योग्य नहीं है। समान प्रश्न मैं सफलतापूर्वक एक कॉम्बो बॉक्स को एक लुकअप में...

javascript - Toggle div $this without toggling another with same class -

How can I toggle this divs Without having toggle the contents with the same class? HTML: & lt; Div class = "panel" & gt; & Lt; Div class = "pane-header" & gt; Settings & lt; Div class = "pane-control" & gt; & Lt; Span class = "pan-toggle" & gt; & Lt; I class = "fa fa-chevron" & gt; & Lt; / I & gt; & Lt; / Span & gt; & Lt; I class = "fa-fa-times" & gt; & Lt; / I & gt; & Lt; / Div & gt; & Lt; Div style = "clear: both;" & Gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "panel-content" & gt; Laurium Ipsum & lt; / Div & gt; & Lt; / Div & gt; JS: $ ('panel-toggle'). Toggle Class ("FA-Chevron-Dow Fa-Chevron Up");} (Toggle Class) ($ ('.pace-content'). Toggle ('sharp'), $ ("i", this). ); Try - $ ('. 'Pa...

How do I format x-axis label in highcharts -

Image
मेरे पास निम्न हाईचार्ट आउटपुट है: मैं बस एक्स-अक्ष लेबल में फरवरी -10 18:00 की बजाय फरवरी -10 देखना चाहता हूं। तो सभी xaxis लेबल फ़रवरी -10, फरवरी -12 की तरह होंगे, और इसी तरह। लेकिन टूलटिप आउटपुट स्क्रीन के समान होगा। मैं एक्सएक्सिस को कैसे प्रारूपित कर सकता हूं, ताकि फरवरी -10, फरवरी -12 और फरवरी -10 की बजाय 18:00, फरवरी -12 20:00, और इसी तरह की हो। $ (function () {$ ( '# कंटेनर') Highcharts ({चार्ट:। {zoomType: 'xy', spacingRight: 20}, क्रेडिट: {सक्षम: झूठी}, शीर्षक: {पाठ: ''}, xAxis: {प्रकार: 'दिनांक', लेबल: {अतिप्रवाह: 'का औचित्य साबित'}, startOnTick: सच है, showFirstLabel: सच है, endOnTick: सच है, showLastLabel: सच है, विभाग: dateAndTimeArray, tickInterval: 10, लेबल: {रोटेशन: 0.1, संरेखित करें: 'बाएं', कदम: 10, सक्षम: सत्य}, शैली: {fontSize: '8px'}}, yAxis: {title: {text: 'Measureme NT मूल्य '}}, टूलटिप: {xDateFormat:'% Y-% m-% d% एच:% एम ', साझा: सच}, कथा: {सक्षम: झूठी}, plotOptions: {क्षेत्र: {fi...

itextsharp - Inserting a table into multiple PDF pages with columnText -

I am trying to insert a table in a PDF template. It succeeds when the table fits on the page. However, if it is too big, then we lose data, basically it just wants to paste a next page of the pen text that looks like page # 5. This is my current code, it is creating a blank white page in front of page # 4 and writing the remaining column text data where it was already pasted for the first time. PDF imported page template page = stammer GetImportedPage (pdfReader, 5); Intra pajamam = 5; While (true) {ct.SetSimpleColumn (-75, 50, pc. A4, Hight + 25, Pagesy's A 4.Width - 200); If (Column text.Hesore text (whistle go ()) break; PageNum ++; Stamper.InsertPage (page new, new rectangle (792f, 612f)); Stamper.GetOverContent (Page News) .AddTemplate (Template Page, 0, 0); } I created a small code sample whose name you used to meet Code can The reason for this is that all the content has been added to the same page. You forgot this line: ct.setCanvas (stamper.getOverContent...

javascript - Google Maps will not display Marker -

I am using Google Maps API v = 3 (v = 2, using the same problem). I have tried the latest Chrome, latest Firefox, the latest IE 11. I am able to display a map and pan in a new center, but I can not get a marker to display me. Here are the script headers: & lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt ;! - Load Google Maps Javascript API - & gt; & Lt; Script src = "http://maps.google.com/maps?file=api&v=3" type = "text / javascript" & gt; & Lt; / Script & gt; And when the user clicks on a particular location in a table, the following function applies. There is a map on the page, and the map takes you to the new location, but the marker never appears. Function SetmapConverter (map, latitude, longitude) {var center = new google.maps .LatLng (latitude, longitude); Map.panTo (center); Var marker = ne...

c++ - using pointer to function to asm file? -

I am reading a book, where a program is written in C so that the shell code can be executed. I copied it, but it did not work, so I tried to fix it. I found that I should use the mmap func to assign memory mobility, and also get the proper permissions, but it also does not work. Here is an example of an asm file: test.asm: xor eax, eax mov eax, 1 Then I call it "nasm -o test test." Compiled with Then to call the ASM module, implement the following code in Book C: void * code; Zero (* func) (zero); // point to function code = Malloc (funcLen); // funcLen, ASM file size compiled file * * fp = fopen ("test", "rb"); Fread (code, 1, funcLen, fp); Func = (zero (*) (zero)) code; (* Fptr) (); But when I run it, I put a "Segmentation error (code dump)" error Function, and the code ends: Zero * code; Zero (* func) (zero); // indicator code = mAMAP (faucet, function, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_AONYMOUS, -1, 0); // funcLen, co...

path - Include PHP File: 2 Different Domains On The Same Server -

I'm looking for it everywhere, but the solution can not be found. I have PHP files at www.domainA.com. I am trying to include files from www.domainB.com on that domain. Both of these accounts are on the same server. I am using full pathing to do this: / path / to / my / site / public_html / include.php but I'm denying permission: WARNING: Include (/home/domainA_account/public_html/folder/include.php) [function .include]: Opening Section Failed to: Permission denied at / / / / / / / I understand why this permission error is appearing, But I do not know how to fix it? P> I think your best bet is to duplicate the file in your two domains, to ensure that they have version control system or deployment Using scripts is put in sync. View your included.php as a third party library, which requires updating your environment, and make sure that a process (if you can do an automatic ...) Make sure the force domain is in sync.

c# - How are writeable bitmaps used with the kinect in VS 2013 wpf applications to hold video information? -

I'm looking at the original sample colors from the Kinect Developers Toolkit Tax ; Using System.Collections.Generic; Using System.Linq; Using System.Text; Using System.IO; System usage threading. Task; Using System.Windows; Using System.Windows.Controls; Using System.Windows.Data; Using System.Windows.Documents; Using System.Windows.Input; System.Windows.Media; System.Windows.Media Using imaging; Using System.Windows.Navigation; Using System.Windows.Shapes; Use of Microsoft Use of Microsoft Keyboard. Tulkit; Using Microsoft Kinect.Toolkit.Controls; Namespace BrianCollarveier {Public Partial Class Main Window: Window {KinectSensor Sensor; Writeable bitmap color bitmap; Byte [] color pixel; Public Manvindo () {Initialization (); } Private Video Windowloaded (object sender, routing events, E) {foreach (various capacities in connect sensor kinetensor) {if (potential status == connectstats.connected} {sensor = potential; break; }} If (null! = Sensor) {sensor.ColorStream.Enable (C...

In Android, FIT_XY crops my image slightly -

I have a (virtual version) version in a png on a large scale, and when a ImageView with FIT_XY this cropped up and a little squire, any thoughts appear? Random layout layout = new relative layout (this); Layout.setLayoutParams (New Layout Paramams (80, 80)); ImageView img = New ImageView (this); Img.setImageResource (R.drawable.myimg); Img.setLayoutParams (New Layout Paramams (80, 80)); Img.setScaleType (ImageView.ScaleType.FIT_CENTER); / / FIT_XY also tried img.setAdjustViewBounds (true); Layout.addView (img); Try to use fixed size (specify height and width) and type of fit_ center scale or

Determine NetBeans IDE Version in Ant -

Image
Within NetBeans Platform Application Build Script (build.xml), I will call NetBeans IDE Product Edition and updates information (i.e., how will I determine) ( , information about help -> about)?

cluster computing - Windows Server 2012 MSMQ Issue -

I have set up a failover cluster in Windows Server 2012 that includes two nodes. I used Microsoft MSMQ for communication If I try to type on the queue remotely using the node name DIRECT = OS: mymachine \ Personal $ \ MyQueueQueue , then I'm able to write it on, but when I use the virtual cluster I use the IP message stuck in the outgoing queue I The firewall has been disabled. I am able to telnet MSNQ port 1801 with node IPS, but the failure is used by cluster which is not able to telnet with virtual IPL.

java - Images in list view jumping from row to row -

I am using a ListView with images, I have an image loader The problem is that when a scrolling fast , The images appear on the wrong lines, when scrolling is off, then everything is returned. This is my adapter: the public class increases MyAdapter ArrayAdapter & lt; MyObj & gt; {Int layoutsource id; & Lt; MyObj & gt; Information; Activity activity; Int rowViewId; Public MyAdapter (Activity Activity, Int Layoutsource ID, List & lt; MyObj & gt; Data) {Super (Activity, Layoutsource ID, Data); This.layoutResourceId = layoutResourceId; This.activity = Activity; This.data = data; RowViewId = R. Layout. My_layout.xml; } Public Static Class Viewer {Public Text View Title; Public image view image; } @ Override Public View getView (View of Entity, Viewview, ViewGroup Parent) {View Line = Convertview; See holder holder; If (line == empty) {Layout Influent Layout Infographic = (Layout Influter) Activity .getSystemService (Reference. LEOUT_INFLATER_SERVICE); Line =...

node.js - How to parse in javascript list of files which are response on ls command -

I am using the ssh2 library to run the remote server / shell command All the files in the specific directory should be listed. How to parse the javascript list of files? I have a string-like response on command ls but it is separated from '' but I can not parse, because in the name '' can also be I ls -al but I do not know that it parses all the chars in the same format. To get the list of remote files in JavaScript, what command for the shell output an entry You can use ls-1 to force you to copy per line (filenames are therefore separated by \ n .). -1 (numerical digit 'one'.) Output to be an entry for each line. This is the default when the output is not on the terminal. It works in most cases, but not in all. For more information about why the output of ls should not be parsed, see. The main point is that there is no implementation of \ 0 character, and ls in the Unix filename that will allow you to type \ 0 Allows to separat...

java - How does having a final variable in a foreach loop work -

कोड के इस भाग पर विचार करें सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] args) { के लिए (अंतिम स्ट्रिंग्स: arrays.asList ("a", "b", "c")) {System.out.println (s); }} यह कोड किसी विशिष्ट उद्देश्य की पूर्ति नहीं करता है, लेकिन अंतिम foreach-loop चर का उपयोग प्रदर्शित करता है। यह कैसे काम करता है? एक एकल चर कैसे अंतिम हो सकता है, लेकिन इसे प्रत्येक लूप के साथ एक अलग मान निर्दिष्ट किया जाता है। या क्या इस चर को विभिन्न स्कोप / स्टैक में कई बार घोषित किया गया है? यह जावा भाषा विशिष्टता में समझाया गया है (JLS),: बयान के लिए बढ़ाया रूप है: EnhancedForStatement: के लिए (FormalParameter: अभिव्यक्ति) वक्तव्य FormalParameter: VariableModifiers_opt प्रकार VariableDeclaratorId VariableDeclaratorId: पहचानकर्ता VariableDeclaratorId [] ... बयान के लिए बढ़ाया प्रपत्र के बयान के लिए एक मूल के बराबर है: के लिए (I #i = अभिव्यक्ति। निषेध (); # i.has अगला ();) {VariableModifiers_opt TargetType Identifier = (TargetType) # i.next (); वक्तव्य} ...

Perl Newbie - Printing value from array -

I'm new to Perl, I'm trying to capture the string outside some JSON output. My code works below, but it seems that a smart way to do this is true, "reportMetadata": {"reportFormat": "tabulated", "detailColumns": JSON here {Code> $ var1 = '{"hasDetailRows" is a sample of ["SUBJECT", "COMMENT_CREATED_DATE", "CASE_COMMENT_CREATED_BY"], "reportBooleanFilter": Null, "reportFilters": [{"Column": "CASE_COMMENT_CREATED_BY" "Operator": "value": "value": "user name"}], "set": ["rOWCOUNT"], "groupingsDown": [], "groupingsAcross": [], "developerName": "My_Comments", "reportType": {"type": "CaseList", "label": "case"} "": "" "{" "" "": "" "{" ...

email - Sync Mail to MySQL -

I have been given the task to synchronize our mail in the MySQL database. Is that an easy way to do this? Or can you suggest making any software available to it? Thank you. Can help you to make connections between two services including email and MySQL.

ruby on rails - How to prevent turbolinks from clearing form input? -

We have a Rail 4 app, which by default is TurboLinks, a strange behavior that we are seeing, a form After submitting, then click the back button, TurboLines clears the form input of all the previous pages. If we disable the turboilines, then this problem gets resolved and the form is filled in as expected. Should the said form be told a way to preserve the input without disabling the turboilance?

ios - Use of undeclared identifier error when trying to perform method call -

I am using the AV Foundation framework, I try to call the method of "DeviceInputWithDevice" for an "AVCaptureDeviceInput" object I am doing The problem is that the method calls "error" in the call that I have named "error" and I get this warning in the encode: using undelcared identifier 'error' All of my Av Foundation Code view controller's ViewDidLoad method is located in the implementation here: AVCaptureSession * session = [[AVCaptureSession alloc] init]; Session.sessionPreset = AVCaptureSessionPresetHigh; AVCaptureDevice * device = [AVCaptureDevice default DeviceWithMediaType: AVMediaTypeVideo]; AVCaptureDevice Input * Input = [AVCaptureDeviceInput DeviceInputWidth Device: Device Error: Error]; [Session addInput: input]; I did not know why the undisclosed identifier warns me for the "error" parameter. Any help is greatly appreciated. You have to declare a error variable that you try to use Are: ...

c# - Object to Object Mapping -

I have a lush service that returns to JSON which I'm deserializing in class in C # me deserialized object Some properties need to be mapped to properties in a different class. However, I would like to do this through the (xml?) Config file which can specify the name of the property from / , So that the mapping code can be changed without recompiling. For example: objectA.Name.FirstName = objectB.FirstName objectA.Name.ListName = ObjectB.ListName What is the best way to do this? You can do something like mapping for you. It has source code and configuration options.

javascript - ProcessingJS and PointerEvents -

Image
I have read the code of the last stable release of the processing.js library and, as I thought, because the port "processing" The port of programming language, there is no sign of support for indicators-events, which will be useful in web sketches. After a long search, I got a series of tutorials on Channel 9 website () called "Creative Coding with Processing.js for Windows 8 Javascript Application". They use the custom version of the library: it is called process_art and it supports the following events PointerDown, PointerMove, PointUp, PointerConnell, PointerOpper, PointerOut What processes implementing these events? Is there another custom version of the JS library? If not, will it be "production-safe" to use the process_rtt library? What is another, less custom version for processing. Library that implements these events? No. If not, will it be "production-safe" to use the processing_rtt library? No.

c# - Check state of combobox and change textbox readonly -

I have a form that shows the gridviewview and the text box and the combo box. When the name of a column is selected in the blankbox, and filters and displays the data searched in the text written in the text box. How can I know that kickbox does not have any selection, and to change the text box to the right position only for reading, and when something is selected, then convert it back to false so that I can search? DataTable dt; Private Zero Searchform_load (Object Sender, EventEurge E) {SqlCeConnection con = New SqlCeConnection (@ "Data Source = | DataDirectory | \ LWADataBase.sdf;"); SqlCeDataAdapter sda = New SqlCeDataAdapter ("Choose TBL from Customers", Con?); Dt = new datatable (); Sda.fill (dt); DataGridView1.DataSource = dt; ComboSearch.Items.Add ("[first name]"); ComboSearch.Items.Add ("Surename"); ComboSearch.Items.Add ("[Address Line 1]"); ComboSearch.Items.Add ("[Address Line 2]"); ComboSearch.Items.Add (...

google earth - R code that evaluates line-of-sight (LOS) between two (lat, lon) points -

Image
Let me line up between two (latitude, lawn) points, about the approach of this problem within the line code Any advice in this will be appreciated. I would like to use R package - raster - to read in the terrain partial data. It appears that the Springdridge package can be leveraged (on the basis), but I wanted to save GIS from loading. Thank you. "post-text" itemprop = "text"> If you just want to know that point A can see point B. Then again, the sample line of the large number of samples in ABC To join, create a geo-profile and then see if the line from A to B penetrates the polygon created by that profile. If it does not happen, then you can see the AB coding which is quite trivial. On the contrary, you can sample multiple digits sampling along the straight line of A to B and see that any of them has an elevation below the height of the terrain. If you have a large number of points to calculate, or if your raster is too wide, or if you want to show th...

javascript - AJAX - Element Update -

I want to reveal elements one by one. But they are fading at the same time, so I specify the ID. Is there a more reasonable way to achieve TIH? & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script src = 'http: //code.jquery.com/jquery-2.1.0.min.js'> & Lt; / Script & gt; & Lt; Script & gt; Var i = 0; Function load XMLDoc () {var xmlhttp, txt, x; Xmlhttp = New XMLHttpRequest (); Xmlhttp.onreadystatechange = function () {xmlDoc = xmlhttp.responseXML; Txt = ""; X = xmlDoc.getElementsByTagName ("artist"); SetInterval (function () {txt + = x [i] .childNodes [0] .nodeValue + " " $ ('# myDiv') .html ('& lt; p id = "p' + I + '"style =" display: none; "& gt;' + txt + '& lt; / p & gt;'); $ (" #p "+ i) .Fade in (1000); + = 1;}, 2000); } Xmlhttp.open ("GET", "http://www.w3schools.com/ajax/cd_catal...

html - Set three divs on one line from PHP foreach -

The force cycle of my HP script generates a div element (product information and 270px width of image) in a big element (width 900px). How to do this? I appreciate any help! In addition to all the solutions, another way to achieve it. If you are looking at the solution from the Fourth loop you can break the array using. & lt ;? Php $ array = array (1, 2, 3, 4, 5, 6, 7, 8, 9); // It will be part of the array in 3,3 values. $ NewArray = array_chunk ($ array, 3, true); Forex Currency ($ new array $ $ value) {echo '& lt; Div class = "separator" & gt; '; // Intranet Inner Arrangements Foreign Currency ($ Value $ as Internal Value) {echo $ innerValue, '; } Echo & lt; / Div & gt; '; } Output: - Now in the divider div, 3 divis will be displayed. & lt; Div class = "separator" & gt; 1,2,3, & lt; / Div & gt; & Lt; Div class = "separator" & gt; 4,5,6, & lt; / Div & gt; & Lt; ...

Android Sqlite SQLiteAbortException does not work -

My application uses some complex SQL statements, so I've often put in the bad habit of using execsql, Even when I should use something like / maybe insert for simple things (bottom) or update. However, I'm wondering why this is not working string queries = "update or abort" + MyTable + "SET" + .... Try the column name and value + ou ... {db.execSQL (query); } Hold (SQLiteAbortException e) {Log.i (tag, "error in updates"); I have tried to do it with data that should obviously fail (i.e., there is no matching record to update), but I'm not catching hold Initially I did update or failed and used a SQLiteConstraintException but when it was not caught I specifically tried attempted an SQLattractException which indicates the exception that the SQLite program is terminated Ia was it could be a result of using or ABORT conflict section through call ABORT trigger either. What am I missing here? UPDATE: Just adding for reference on IN...

angularjs - Is there a way to automatically generate karma.conf.js with a grunt task? -

I am using a modified version of gruntfile which comes with puberty. Base baseballs generator, and the command set on the grunt-edge is very easy to keep my base index.html file up-to-date with dog dependencies. However, when I do a conveyor install (package) and then the cursive cursor-index, my index.html update, but my action. JS is not updated, which means that I need to manually add a new file to the list of files when the Karma runs the trial suite (otherwise the injector fails to inject a redundant package) . Is there any easy way to add to my hard workflow? This is not the end of the world, but it is one of those things which easily forgets. I really just came up with the solution to this problem. Check out 'bower-install': {app: {src: '& lt;% = yeoman.app% & gt; /index.html ', ignore path:' & lt;% = Yemen app% & gt; / '}, Exam: {src:' karma.conf.js', file type: {JS: {block: / (([\ s \ t] *) \ / \ / \ s * bower: * ...

pdf generation - Generate Fillable PDF from word -

I have a word template with some empty areas, around 25 templates . I need to produce the contents of those contents to be fillable PDF . Specifically How can I define a field (text box, checkbox) in my word template to create a PDF I have worked on itextsharp but this allows me to generate a PDF from PDF, and I did not find any way to edit it.

c# - Get sub array from a 3D array -

यदि मेरे पास एक सरणी है: int [,,] mainArray = new int [ 10,10,3]; मैं कैसे एक उप सरणी प्राप्त कर सकता हूँ: int [] sub = mainArray [0,1]; // दुर्भाग्य से यह काम नहीं करता जहां उप में 3 तत्व शामिल होंगे उप [0] = मुख्य अर्रे [0,1,0]; उप [1] = मुख्य अर्रे [0,1,1]; उप [2] = मुख्य अर्रे [0,1,2]; ऐसा करने के लिए एक विधि लिखना आसान होगा, लेकिन क्या ऐसा करने में एक तरह से बनाया गया है? मुझे लगता है कि आप इस तरह से एक एक्सटेंशन विधि का उपयोग कर सकते हैं: सार्वजनिक स्थैतिक वर्ग MyExtensions {सार्वजनिक स्थैतिक int [] GetValues ​​(यह ऐरे स्रोत, int X, int y) {var लंबाई = source.GetUpperBound (2); Var मान = नया int [लंबाई + 1]; (इंट आई = 0; आई & lt; लंबाई + 1; आई ++) के लिए (मान [आई] = (इंट) स्रोत। गेट वैल्यू (एक्स, वाई, आई); } वापसी मूल्य; }} उपयोग: int [,] mainArray = नया इंट [10,10,3]; Int [] sub = mainArray.GetValues ​​(0, 1);

angularjs - Assemble (static Site generator) With Angular JS -

I want to create a site, using Yeoman, and AngularJS. The plan is to handle the collected materials and handle the dynamic content through the Aangular AGI. Are two compatible, this is a good choice of architecture? My concern is to use the thermal engine engine (handelbers) and whether it is compatible with AngularJS, because they use both {{}}. I have only begun the investigation, but I am struggling to find examples of people who use the same architecture. How do I loft with Yeoman? I am doing something similar and with the template to handle this issue, the delimiter I angular interpolateProvider To change the delimiter for angular use. On App = angular.module ('app', []). Config (function ($ interpolateProvider) {$ interpolateProvider.startSymbol ('{%'); $ InterpolateProvir.Andismbol ('%}';}); I'm sure that you can configure when some of the scaffolds are running Yeoman automatically not to use the new delimiter, but I hope it gathers Sep...

javascript - What's the difference when defining var as 0.5 compared to .5? -

I'm curious, I've already programmed JavaScript in a few years but when I look at the following variable declarations Illusion: (OCC. These can be any other number). var exampleOne = 0.5; Var example: two = .5; What is the difference between the two, or is there anybody? Do I not clearly understand the hidden benefits of some kind? There is no difference. / P> Parallel is parsed - that is, both 0.5 and .5 (as .50 ) Same number (Unlike most other languages, javascript has only one type of number.) i always before decimal [optional] leading 0 I like to include.

ios - Weird date result adding 1 month to a given date -

Image
I am using the following code to get the date of the next week from the date of 12:00: / P> NSDT * now = [date of NSDT]; NSCalendar * Calendar = [[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar]; NSDateComponents * Component = [Calendar component: NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnitDate from: now]; [Component sethour: 0]; NSDT * nowadays = [calendar date edit] components;] IntDatOd = 7; NSDT * tomorrow date = [date of day date to date: 60 * 60 * 24 * dinoAud]; NSString * stringDate = [NSString stringWithFormat: @ "% @", yesterday's date]; TodoItemDueDateText.text = stringDate; NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; [DateFormatter setDateFormat: @ "EEEE, DD MMMM YYYY"]; NSString * fechasimulada = [dateFormatter stringFromDate: tomorrowDate]; DateFieldSimulatedText.text = Copy the Fade; If I log the date of the result, then it is working fine. Now, the date of...

javascript - Regex matching whats inside quotes but not the same quote inside the line -

I'm trying this regex / ([']) ((?: (?! \ 1 ) [^ \\] | (?: \\\\) * \\ [^ \\]) *) \ 1 / to collect in an array of "variable" list from a GET response to looks like a string: "var chatbox_messages = '& lt; p class =" chatbox_row_1 clearfix "> & amp; nbsp; & lt; span style =" font-style: italic "& gt; you are disconnected. & Lt; / span & Gt; & lt; / span & gt; & lt; / p & gt; 'var chatbox_maillist =' & lt; h4 class = "member-title online" & gt; online & lt; / h4 & gt; Lt; ul class = "online-user"> The above string is just X overflow and it's annoying ... Anyway, this code was previously using code to eval and I do not use eval so I try to fix the code and get the parameter I am so that I just var response = responseText.match (/ ([]) ((: (1) [^ \\] | (?!? \\\\) * \\ [^ \\]) *) \ 1 / g) Var message = response [0]; var second...

javascript - How do I know which <li> element was clicked from a <ul>? -

I have & lt; Ul & gt; , and every & lt; Li & gt; The background of is 50px * 50px but I want to know which code is gt; I click on ul, first, second, third. Each & lt; Li & gt; has an image, therefore, when I ; Li & gt; another & lt; Div & gt; , but when I want to change the image I wanted to know, click on which was clicked. $ ("# ul element"). ("Click", "li", (function () {$ ($ ("# theediv"). $ ("# Thediv") empty (). App (' gt;' + this Inner HTML + '& lt; / li & gt;'); $ ("# thediv") .FadeIn ("slow");})); So when I took one Clicking on the image goes to div, but I want to know which index is taken (1,2,3,4,5, etc.). You can use the following to get the current index in the list $ (this). Index ();

android - How to compress Ti.utils.base64encode and decompress using .Net method? -

Does anyone know how to use Ti? For example, I have this code: uploadFile = Ti.Filesystem.getFile (pathfile, listing [_fileCtr] .toString ()); UploadFileName = Listing [_fileCtr] .toString (); Encoded file = ti.tel.base 64xode (upload file.read ()). ToString (); // Send image to Net Web Service and for titling decompressing the image it is the method in my web services (if I can compress my image before): {Gyzipstream zip = new gzipstream (output, compression mode. Decompress) using the [byte [] input) {(memorystream output = new memorystream) {list & lt; Byte & gt; Bytes = new list & lt; Byte & gt; (); Int b = ZIP Redbyte (); While (b! = -1) {bytesad (byte) b); B = zip Redbyte (); } Return bytes. ToArray (); }} So far, I can not find some method to compress my byte array, so I can decompress them using my .NET method. If u guys If you have any information about the problem, please tell me .. Many thanks .. :) In the net, you can use the convertin...

Removing From ArrayList, In Loop Based On It's Size, But Breaking After Remove Still Gives OutOfBounds -

OK, so I remove an orange from the array list, break it, but I still get the outbound I am a little confused, someone can help me, I have tried to separate the problem, but I still can not understand it. Here is an error: Exception threads "Thread-2" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 on java.util.ArrayList.rangeCheck ( GameFunctions.act at GameFunctions.act on (ArrayList.java:635) at java.util.ArrayList.get (ArrayList.java:411) GameFunctions.act (GameFunctions.java147) GamePanel $ 1.run (GamePanel.java:50) Here are two methods (if (Actor equivalents ("germ")) {for (int i = 0; i & lt; g.size (); i ++) {if (live .t.T. Examples of Spinumonia) {g.get (i) .move (); G.get (i) .testBounds (); If (Czechs (G, I)) {System.out.println ("broken"); break; }}}} And if (Actor equal ("whiteboard seals")) {for (int i = 0; i & lt; p.size (); i ++) {pgate (i) .setTarget ( Closest goal (G, P. Mill (i))); P.get (i) .move (); }...

nth-of-type CSS selector hierarchy issues -

I want the background color of a div in the alternative. The red, black, red, black ... elements are at the same level, but I am unable to work in this case: div class = "after Preview-cover "& gt; & Lt; Div class = "post-preview" & gt; & Lt; H1 & gt; Advertising for website & Lt; / H1> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "post-preview-wrapper" & gt; & Lt; Div class = "post-preview" & gt; & Lt; H1 & gt; Adipisicing Elite A Communications Company Limited. & Lt; / H1> & Lt; / Div & gt; & Lt; / Div & gt; and css . Post-preview: nth-of-type (even) {background-color: red; } .post-preview: nth-of-type (weird) {background-color: black; } How to set the selector properly? Thanks a lot! You can turn on nth-child container ... .post-preview-wrapper: nth-of-type (even) .post-preview {background-color: red; } .post-preview-wra...

javascript - Can i use youtube api with Iframe without using Iframe id to get palying status? -

Can I use the YouTube API without using an iframe ID to get a pirgling status? I want to use video ID instead of Iphone ID. When your player object is set, you first have the parameter as either: 1) element id (if it is already embedded, or iframe of any other element if you are replacing an element on the page with your player) or 2) a dom node Represents the element. So if you do not have IFreame ID, then you have to use some method to identify the DOM node ... whether it's with the jQuery selector, parsing element source attributes with Regex, In any case, there is no disclosure of only passing in a video ID and Player APIs have to find the video ID that is to outsource that video ID; You have to write such a function yourself.

Rails Paperclip inserting instead of updating -

I have created a simple application that has a product and an image model. The product is in it - many images and images are an attached file feature (paperclip). I have created a simple_form to create / edit products and it works fine on the creation. However, while editing a product with N images, the rail inserts more N files - empty files. I have set up a simple form custom input which tests if the image attachment is present in that position rather than changing that location, it provides only one image_tag (). I see that the HTML has been generated and it shows some weird, hidden tags: And in the Rail Server console I am looking for: ProductsController # Updated as HTML Parameter: {"utf8" => "✓ "," Authentication_token "= & gt; "Asdfasdfaasdf =", "Product" = & gt; {"Reference" = & gt; "Y1112CYL.E2", "images_attributes" => {"0" = & gt; {"Id" ...

javascript - Jquery mobile not rendering all 'data-role="pages"' present in an html file -

I have an html file in my web-folder, which can only be accessed by servlet here. How my servlet requested for that html page ServletContext context = getServletContext (); Request Dispatcher rd = context.getRequestDispatcher ("/ WEB-INF / file.html"); Rd.forward (req, resp); My file.html has 2 data-roll = "pages", but only 1 data-role = "page" is being translated. Do you have any ideas, because only 1 out of 2 pages is being provided by jquery-mobile here is my file.html template. & lt; Div data-role = "page" id = "profile-page" data-dialog = "true" & gt; ... & lt; / Div & gt; & Lt; Div data-role = "page" id = "home-page" & gt; ... & lt; / Div & gt; So basically forwards my Overlit to file to user.html, this is one reason why a page is not being created. In jQuery mobile, we can only show one page at a time, because each page has a full visible height l...

jbpm - Accessing Java class objects in user task in jbpmn -

I have created a jbpmn workflow to create a worktemm and intend that someone needs to hand over the assignments to the individual user Can I use any Java class object inside the jbpmn user function? You can always pass by using Java objects as a parameter for JBPM process and JBPM Use it in the process. You can pass the variable from the Java file to provide a dynamic user. If you need to use that changed value in the Java file, you can always use the global object (shared between Java file and JBPM process).

neural network - Counting number of clusters in data using Self Organizing Map -

I know SOM roughly and it is mapping its network to different groups of trained data. How to apply the calculation of the number of groups using SOM? I use the KNL library to apply SOM. In my demo, it is shown how how can I implement this to calculate the number of groups of training and testing? I know I can also use DBSCAN for cluster calculation. But first, I want to implement SOM for cluster calculation. My input data represents the digit in 2D space, such as (132.181,0.683431), (136.886,0.988517), (137.316,0.504297), (133.653,0.602269) From your question it seems that you think DBSCAN and SOM do the same thing If so, then you are wrong SOM only reorganize your data (and reduce dimension), while DBSKANAN group cluster data. Learning SOM No is a clustering algorithm. The closest thing to the SO means (which in turn is a clustering algorithm). The only difference between the tools and the SOM is that the SOM (A) is not cluster and b) use the neighborhood function. ...

function - How to specify number of digits in a float number in php? -

संख्या है: 1234.56789 या शायद '-1234.56789' क्या । कुछ ऐसा है: intNumber (१,२३४.५६७८९); // 4 नाव संख्या (1234.5678 9); // 5 संपादित करें: वास्तव में मैं यह देखना चाहता हूं कि यह संख्या 4 अंक से पहले (।) और 5 अंकों के बाद (।) है। यदि हां, तो मैं इसे डेटाबेस में सहेजता हूं, और यदि नहीं, तो मैं उसे डेटाबेस में नहीं बचाता। पीएचपी में सटीक नामक एक अतिरिक्त पैरामीटर के साथ प्रयोग करें। & lt;? Php echo round (1234.56789,4); // "प्रिंट" 1234.5679 // ^ --- सटीक पराम संपादित करें: बहुत बहुत धन्यवाद दरअसल, मैं यह देखना चाहता हूं कि इस नंबर के पास (।) और 5 अंक के बाद (।) के बाद 4 अंक हैं। यदि हां, तो मैं इसे डेटाबेस में सहेजता हूं, और यदि नहीं, तो मैं इसे डेटाबेस में नहीं सहेजता हूं। यह एक थोड़ी हैक हालांकि है .. & lt;? Php फ़ंक्शन नंबर जांचें ($ फ्लोट) {$ arr = विस्फोट ('।', $ फ्लोट); यदि (स्ट्रेलन (ट्रिम ($ arr [0], '-')) == 4 & amp; strlen ($ arr [1]) == 5) {वापसी 1; } और {वापसी 0; }} यदि (संख्या की जाँच...

properties - how to get the modified value of property after the feature is installed? -

I used to input some code, and to store them at OnFirstUIBefore () Dialog is used in USERINF . . However, when I want to get input by the value of the value of , then feature_installed () , what I find is a default The value is. I've added Secure Custom Properties to the USERINF , but still can not find the modified value. How can I fix this problem? I've always written the values ​​in this way registry, then to bring them back into the property AppSatch is used There has been no construction to continue these values ​​made in MSI.

node.js - nodejs configuration using (*.p2f) file in eclipse -

Image
I'm a newbie for the nodes environment. I had just started learning about nodes, but I was stuck with the establishment of the environment. When I am trying to install the environment using the * .p2f file, which I am downloading from the eclipse market location support site for nodes, then I am getting the following errors. help me Resolve Configuration problem node .p2 in tool suite Using the f file You have received the Enide .p2f file, which should be used on these Eclipse as file -> Import -> Install -> Install software items from the file (All instructions are in the P2F file, which you can open with the text editor. This is just the XML file) Actually, nodeclips in the project download page to get started with nodes.js and eclipses New are several options. You can download Enide Studio Wise to go to the plugin set. Or install the Nodeclippers plug-in in any eclipse based IDE. Choose which option will work for you. @Dot_NET Junior Ple...

expandablelistview - Android how to implement expandable listview filter search? -

I'm trying to develop another Android application so that expandable list view can search group items from filter search . I have got several tutorials that do this, where a search bar is placed at the top and if you type in the box, the results are filtered. I find competent and much related to my problem and I have adopted the way for implementation. I was unable to get successful results. It is working without any errors. Please suggest some tutorials to get this work done. Any help is appreciated .. is not done correctly , Then implementing your own filtered search can be annoying, difficult, and buggy. Unfortunately, Android does not provide a filter adapter for use with ExpandableListView which means that you have to roll your own solution instead, rather than passing through that pain, I suggest that it is a complete There is a developed expandable list adapter which adds filtering support (as well as many other things) apart from this, there are several...

spring mvc - After adding ContextLoaderListener in web.xml. 404 Error as "The requested resource () is not available." -

In my spring mvc application, when I am adding applicationContext.xml to a web.xml file: & lt; Context param & gt; & Lt; Ultimate Name & gt; ContextConfigLocation & lt; / Lastname & gt; & Lt; Ultimate Price & gt; /WEB-INF/applicationContext.xml< / Super-valued & gt; & Lt; / Reference param & gt; & Lt; Listener & gt; & Lt; Audience category & gt; Org.springframework.web.context.ContextLoaderListener & lt; / Listener Category & gt; & Lt; / Listener & gt; When I delete the tag, this file is working on how I use applicationContext.xml applicationContext.xml & lt; ? Xml version = "1.0" encoding = "UTF-8"? & Gt; I can include. & Lt; Beans xmlns = "http://www.springframework.org/schema/beans" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: reference = "http: // www. Springframework.org/schema/context "xmlns: p =" http:...

c# - How to convert the following foreach loop to linq code format? -

संहिता: foreach (var testView in projectDataCandidate.ViewMaps। जहां (vm = & gt ;; Vm.IsNotTestLane)। चयन करें (यह। GenerateTestView)) {यह.SwimLaneViews.Add (testView); TestView.ItemsOrphaned + = OnItemsOrphaned; } उपरोक्त foreach लूप को लिनक कोड स्वरूप में कैसे लिख सकता है? धन्यवाद। projectDataCandidate.ViewMaps। जहां (vm = & gt; vm.IsNotTestLane)। चुनें (this.GenerateTestView) .ToList () .पहले (testView = & gt; {यह। स्मीमैन दृश्य। जोड़ें (testView); testView.ItemsOrphaned + = OnItemsOrphaned;});

ruby on rails - Paperclip processor not changing file contents -

I am trying to change the lines of an uploaded text file attachment using the paperclip processor in Rail. I can verify with a debugger that my processor is called, but the file attached is my original file, not a file written by the processor. Here's my processor: Module paperclip class Utf8 & lt; Processor def start (file, option = {}, attachment = nil) super @ file = file @ attachment = attachment @ servantmat = file. IDName (@file.pass) @format = options [: format] @ BSName = file BSN (@ File.path, @current_format) make the end DEF @ file.rewind tmp = Tempfile.new ([@ basename, @format]) IO.foreach (@ file.path) do | Line | TMP & lt; & Lt; Line.encode ('UTF-8', 'binary', invalid :: substituted, undo: replace, replace: '') end end of tmp.flush tmp end And here's my model: Category list & lt; ActiveRecord :: Base has_attached_file: file, storage :: s3, s3_credentials: Rails.root.join ('config', 'aws.yml'), b...

c# - Locate up until quotes regex -

to find the string "http://www.foo.com/folder, regex's to c # It is possible to use / know the file " only " http://www.foo.com . Then these steps will be: "http://www.foo.com Locate Get all the strings until then To " Multiple " http://www.foo.com/folder/file " I want to put in a string [] Individuals can: string regex = @ "(http: // www \ .foo \ .com (?: \\. | [^" \\]) *) "

codeigniter - undefined variable $error in file uploading class codeingiter -

I am trying to use the Codeigniter upload class to upload pdfs to a folder that is working fine . However, the error variable is visible as undefined and for this reason I am not seeing the error if I am uploading the wrong file. Please suggest. This is my view, & lt ;? Echo echo php $ ;? & Gt; & Lt ;? Php echo form_open_multipart ('admin / admin_elements / do_upload_pdf') ;? & Gt; & Lt; Input type = "file" name = "pdf" class = "btn" /> & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Input type = "submit" class = "btn btn-info" value = "upload" / & gt; & Lt ;? Php echo form_close (); ? & Gt; and my controller function, function add_pdf () {$ data ['main_content'] = 'admin / elements / add_pdf'; $ This- & gt; Load-> View ('/ template', $ data included); } Function do_upload_pdf () {$ config ['upload_path'] = './uploa...

objective c - ios 7 UIView animateWithDuration: .. runs immediately -

I have trouble with the method for animation I created my own callout bubble for GoogleMap @interface callout view: UIVU @ property (nonatamic) mapmarker * marker; @end @implementation {UIView * titleView; UILabel * titleLabel, * addressLabel; } // other init methods are not shown - (zero) set marker: (MapMarker *) marker {_marker = marker; TitleLabel.text = Marker. Diversity. Name; AddressLabel.text = marker.university.address; [Title labels size tofitt]; TitleLabel.minX = 0; [Title label Remove LayerAll Animation]; If (titleLabel.width> titleView.width) [Running itself]; } - Running Labels {Zero} {CGFloat timeInterval = titleLabel.width / 70; [UIView Chet Realism: Time Lag Delay: 1.0 Option: UIViewAnimationOptionOverrideInheritedDuration | UIViewAnimationOptionRepeat Animation: ^ {titleLabel.minX = -titleLabel.width; } Closing: ^ (BOOL Finish) {titleLabel.minX = titleView.width; [Self floating label]; }]; } @end I create assets in my ViewController @implementation M...

c++ - Is there a concept like include directory aliases? -

I am using several third-party libraries in a cross-platform project. After all I have included my source in my repository Decided to do it, they do not need to download it again on every platform. It is allowed by license To include headers from those libraries, I need to specify their file path. In some libraries, they have name / include / name / file.h I would like to include the header in my code as always #include "name / file.h" where name is the name of the library. But I do not want to modify the library structure of the libraries nor do I want to copy all the headers into the directory included in my desired structure. Is there a way to define other names in the directory? For example, the headings of bullet / src , Sqlite in the bullet physics titles are directly sqlite and SFML is in the sfml / include / SFML . I would like to specify something like this: #alias "dependency / bullet / src" "bullet" #alias "depen...

Lists of DBObjects - Mongo Java Driver -

I am creating a game where kits in different multiplayer servers can buy player kit, where it saves in a Mongo database is. I would like to format the database: {"server": "the_server_name", "player": {{"player": "the_players_username", "kits": ["i" I am trying to do this "," kit 1 "," kit 3 "]," player ":" the_players_username "," kits ": [" kit1 "," kit2 "]}}} / Pre> How to get someone to wish to start someone? Thanks! Here's a simple example: import com MongoDB *. Public square MongoTest {public static zero Main (string [] args throws exceptions {Mongo client mongo client = new moongo client ("localhost", 27017); db db = monoglant.gettbie ("migamedi"); dBCollection gameCollection = db.getCollection ("myGameCollection"); BasicDBObject obj = New BasicDBObject () .Append ("saver",...

objective c - How to get position of sprite with a particular tag in Xcode? -

I'm new to XCode and Obj-C, so please forgive me if I'm pretty clear here. I have a project in which I create a Sprite by calling this editorial function: CCSprite * _tree = [CCSprite spriteWithFile: @ "tree.png"]; [Self combine: _tree z: -1 tag: i]; If (i == 0) {_tree.position = CCP (100, 100); } And if (i> gt;) {_tree.position = CCP (tree with i-1 tag) +20, 100); } So I call this function using an update method: - (zero) add: (ccTime) dt {[self AddTree]; I ++; } In this way, each tree that is born will have more number of tags than the last number. The first tree is grown at 100,100 How do I prepare the next tree before the tree's X position (i-1) plus 20? And is there an easy way to do this? CCSprocess * tree = (CCSP) * [self attainment childbat: I - 1 + 20] ; // or any integer CGPoint position = tree.position; I hope that you find me right. Note that getChildByTag returns zero if there is no child with any such tag

machine learning - Named Entity recognition -

I'm using Stanford Ner to get rid of the essays. These names are being detected, but the names of the Indian names like Ram, Shyam etc. are not known. What should I do to make them recognizable? You should train NER for Indian names. I could not find detailed information on how to achieve this, but this frequently asked page (page) contains some information that might be the starting point for you. Especially questions 2-3 are related to your question directly.

.htaccess - Changing video content type (mime type) in CDN in drupal 7 -

I am using the media module to save media in the cdn. To play the video, we are using jwplayer in Drupal 7. JWAPE throws an error in IE, if the video is content type [mime type] * not video / MP3 *. I changed existing cDN video mime type from app / octet-stream to video / mp34 . Now whatever the MP4 videos are being uploaded / saved in CPN should only be video / MP3 mime type, but when I upload the MP4 video in the media module I am saved in the CDN mime type application / octet-stream, how do I change video / mp3 4 from the uploaded mime type [content type] I am cdn module code function cdntransfer_saint ($ source, $ destination) {$ S3 = _CDN_transfer_load (); $ Up_bucket = "cdn.example.com"; $ UploadOk = Null; $ End = date ('D, DMYH: I: SO', stratomet ('+ 10 years')); $ Header = array ('content-type' = & gt; 'video / mp3', 'expire' => $ has expired); If ($ Destination) {$ up_state = $ s3- & gt; Put...

regex - Regular expression with a set with a character followed by a character -

I am writing a regular expression in Java to capture some words without spaces. Words can contain only letters, numbers, hyphens, and dots. Character set [\ w + \ - \\.] The job is okay now I want to edit the set to allow a single space after the dot. How do I edit my regular expression? You can add matching to this additional requirement ( [\ W \ -.] | (? & Lt; = \.)) + See this (? & Lt; = \. ) is one that ensures that the location is only matched, if it occurs before a dot. Other signals: \ w Underscore and default only to matches ASCII characters / points if you focus on Unicode , Then use UNICODE_CHARACTER_CLASS modifier or \ p {L} and to enable Unicode for \ w . \ P {Nd} to match the Unicode characters and digits. You do not need to avoid the dot in any square class. In your character group you have \ w + , do you know that you can add "+" characters for acceptable characters?

ios - Create word cloud (word mosaic) programmatically -

Image
I am writing an iOS app that can make a word cloud or word mosaic with the selected pattern by the user. My question is, how can I calculate the coordinates of each word, randomly calculate the size of each word? Or any other approach? Note that I work on this pattern But instead, my app is white The mosaics will fill the white areas, while the user's picture will be preserved. My algorithm now has to set the size and position of each size randomly, just put them there. How can I check that each word I am putting in is a different one And does not interfere with each other with a picture? Reference: