Vote count: 0 This is my directory structure. dirOut ├── dirIn1 │ ├── temp1 │ └── temp2 ├── dirIn2 └── dirIn3 ├── temp1 ├── temp2 ├── temp3 └── temp4 dir is directory and temp is file.I want to find files which contain specific string "Hello".How do I use command "find" to find. asked 2 mins agoLarry Lu Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am creating a list which has some form elements like html checkbox or radio-buttons. I want to give them dynamic ID and for values to its corresponding LABEL tag. All this but using JQuery/JavaScript. I am not that good in JavaScript $(document).ready(function() { function { var count = 0; var total = $('.product-menu li').length(); } }); .product-menu { display: block; list-style: none; margin: 0; padding: 0; } .product-menu li { display: list-item; line-height: 2; } .product-menu label { font-weight: normal; vertical-align: middle; padding-left: 10px; display: inline-block; } New Arrivals Accessories Bags Jackets asked 43 secs agoDeepak Yadav Let's block ads! بخوانید...
ادامه مطلبVote count: 0 i want to find out native max address of an HDD over SAS interface. i am using SAT ( scsi ata translation) with SCSI_PASS_THROUGH. but unable to find out any buffer or valid senseinfo of SCSI_PASS_THROUGH with IOCTL_SCSI_PASS_THROUGH from drive. cdb value of SCSI_PASS_THROUGH = sptwb.Spt.CdbLength = 12; sptwb.Spt.Cdb[0] = 0xA1;//ATA PASS THROUGH(12) OPERATION CODE(A1h) sptwb.Spt.Cdb[1] = (4...
ادامه مطلبVote count: 0 I have a pop up window on webpage where in i need to click on "Next" and "Cancel" button. I have tried navigating and find the css selector but couldnt able to locate and click on Next & Cancel button. Below is the Fire bug things when i got after hovering on Next & Cancel Button. Please help how to click on Next & Cancel button Next Cancel asked 1 min agouser3349459 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 My function works fine by itself but won't work with sapply... getFlights % select(origin, dest, flight) %>% summarise(incoming = length(unique(flight))) y% filter(dest == code) %>% select(origin, dest, flight) %>% summarise(outgoing = length(unique(flight))) z...
ادامه مطلبVote count: 0 My Heroku Rails Production app is secured via an SSL certificate. For my staging environment, however, I rely on a self-signed certificate. When using SendGrid's inbound parse webhook, it attempts to parse an email and POST to an endpoint in my app for processing. On staging all the requests are failing because REASON500 Can't coect to staging.example.co:443 (certificate verify failed) Is there a way to circumvent this, similar to the -k flag with curl that lets you ignore SSL with an insecure coection asked 51 secs agouser2490003 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Getting the following error when trying to use the copyObject command (AWS S3). I'm using the AWS PHP SDK, and here is the code: $this->client->copyObject(array( 'Bucket' => 'lms-courses', 'Key' => 'ideasfile.zip', 'CopySource' => "lms-courses/lalala.zip", )); Error executing "CopyObject" on "https://s3-us-west-2.amazonaws.com/lms-courses/ideasfile.zip"; AWS HTTP error: Client error: PUT https://s3-us-west-2.amazonaws.com/lms-courses/ideasfile.zip resulted in a 404 Not Found response: NoSuchKeyThe specified key does not exist.lalala.zipE698888 (truncated...) NoSuchKey (client): The specified key does not exist. - NoSuchKeyThe specified key does not exist.lalala.zipE698888912B81...
ادامه مطلبVote count: 0 How to share a Youtube Video on Facebook using open graph share dialog. This is what I been trying, it creates a post but it does not take me to youtube. String actionName = "play"; String objectName = "song"; String nameSpace = "myNameSpace"; String videoUrl = "https://youtubeUrl"; String objectType = "music.song"; ShareOpenGraphObject object = new ShareOpenGraphObject.Builder() .putString("og:type", objectType) .putString("og:image", imageUrl) .putString("og:video:url", videoUrl) .putString("og:title", item.getSnippet().getTitle()) .build(); ShareOpenGraphAction action = new ShareOpenGraphAction.Builder() .setActionType(nameSpace + ":" + actionName) .putObject(objectName, obj...
ادامه مطلبVote count: 0 A PHP Error was encountered Severity: Notice Message: Undefined index: uploadimg Filename: models/upload_model.php Line Number: 26 /my code/ Controller public function do_upload(){ $this->upload->do_upload(); if($this->upload_model->Doupload()){ echo 1; }else{ echo 0; } } private function set_config_option(){ $config =array( 'allowed_type' => 'gif|jpg|png|jpeg|pdf|doc|xml|zip|rar', 'file_size' => '100', 'max_width' => '1024', 'overwrite' => TRUE, 'max_height' => '768', ); retu $config; } Model private function set_config_option(){ $config =array( 'allowed_type' => 'gif|jpg|png|jpeg|pdf|doc|xml|zip|rar', 'file_size' => '2048000', 'max_width' => '1024', 'overwrite' => TRUE, 'max_...
ادامه مطلبVote count: 0 I have used the following code but when i click on the login button i'm redirected to a blank page.in this i have created a login pAGE that checks if the user is present in database.i have not given a sign up page instaed manually added values to the database.in sign-in.html i have given the form and in coectivity.php file i have given the code to check if user and password are present in database. as per code the output should have been "succesfully logged in" or "error could not login" but instead i get a blank page.how do i resolve this.please help!! the php file that coects to db asked 1 min agoclahari Let's block ads! بخوانید...
ادامه مطلبVote count: -2 Wanted to run a program before and after my Windows system reboot from commandline/DOS prompt and script should execute next step after shutdown command. Like: Loop for 1 to 10: 1. Run my first application1/batch1 file. 2. Reboot system (using shutdown command) 3. Run my second application2/batch2 file. End Loop We can use startup folder to run the second application, but I wanted to have a single script to do things. The script should start from the place where system got rebooted. Is there any way to do so please help? asked 26 mins agoNV12YUY2 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I currently have a template in django with the jsTree plugin working that updates/saves the JSON data when a user interacts with the data provided. I can't figure out how to save this data into my database for a user so that it will retu the same JSON data/changes they've made when they retu to this page. Below is the code I have ruing in the template. Javascript is included in the same file for ease of viewing at the moment. {% extends "testapp/base.html" %} {% block body_block %} demo Create Rename Delete Save Changes var testData = ["Child 1", { "id" : "demo_child_1", "text" : "Child 2", "children" : [ { "id" : "demo_child_2", "text" : "One more", "type" : "file" }] }]; func...
ادامه مطلبVote count: 0 Hi i am getting the following error while selecting data using angular.js. Error: angularjs.js:107 TypeError: Caot set property '0' of undefined at n.$scope.removeBorder (adminCustomerNewController.js:55) at fn (eval at (angularjs.js:212), :4:617) at n.$eval (angularjs.js:132) at angularjs.js:251 at angularjs.js:263 at m (angularjs.js:7) at $$writeModelToScope (angularjs.js:263) at angularjs.js:263 at g (angularjs.js:261) at f (angularjs.js:261) My code is given below. {{d.day_name}} Select Category Select Subcategory...
ادامه مطلبVote count: 0 I have a dictionary like so: { 'cost' : cost, 'oLen' : oLen } I write this to file so the file contains: {'oLen': 32, 'cost': 2048} Later, I do this: with open('conf.conf') as f: config = json.loads(f.read()) print config['oLen'] And get this: ValueError: Expecting property name: line 1 column 2 (char 1) If I change json.loads to json.dumps, I get: TypeError: string indices must be integers, not str edited 1 min ago asked 4 mins agoAurora 3 Answers Vote count: 1 You need to use double quotes in your JSON. If you use json.dump to write the original dictionary to the file, you won't need to worry about it though! answered 1 min agoHumphreyTriscuit Vote count: 0 Change your single...
ادامه مطلبVote count: 0 I want calendar like this when calendar shows it's show current date and i want able see only in that calendar before three months date and after three months date only. i am getting current date and i am selecting any date. asked 1 min agoVenkataKranti Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Actually I'm going to convert the .docx file into .xhtml. so I need to find out the doc file in the given directory and unzip it. After getting document.xml from the word file I need that file to process with some xsl files to get final result as .xhtml. //-------------------------Source--------------------------------------simpleTransform(Source+"/"+"filename"+".xml", Source+"/01-W2H.xslt", Source+"/"+"out2.xml"); simpleTransform(Source+"/"+"out2.xml", Source+"/08-xmlns.xslt", Source+"/"+"out22.xml"); simpleTransform(Source+"/"+"out22.xml", Source+"/06-Heading.xslt", Source+"/"+"out3.xml"); simpleTransform(Source+"/"+"out222.xml", Source+"/02-FigureRef.xsl", Source+"/"+"out222...
ادامه مطلبVote count: 0 When attempting to create a PDF using PdfDocument from a Webview, my content is always blank. Trying a very simple example (writting a report writter) and yet the string does not show up in the PDF. The PDF is getting create, however the text is not showing up. WebView webview; String summary = "A very simple line of text "; webview.setBackgroundColor(Color.RED); webview.loadDataWithBaseURL(null, summary, "text/HTML", "UTF-8", null); PdfDocument document = new PdfDocument(); int pageNumber = 1; PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(webview.getWidth(), webview.getHeight(), pageNumber).create(); PdfDocument.Page page = document.startPage(pageInfo); webv...
ادامه مطلبVote count: -1 I have the following array: $array = array("6", "66", "67", "68", "69", "697", "698", "699"); I have the following strings: "69212345", "6209876544", "697986546" I want to find the array element which matches longest part from begiing of the string, i.e. for "69212345" array value "69" will be selected.for "6209876544" array value "6" will be selected.for "697986546" array value "697" will be selected. Please help me how can I achieve this? edited 37 secs agoRizier123 asked 1 min agoTareq Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am unable to update specific text from firebase with angular. I have read the firebase docs and am using .on -- The data retus in the console log when it updates and My app updates an image, but not the h1 tag which is suppose to be the integer it retus The image updates like its suppose to but the number doesn't. Any help is greatly appreciate. //controller var firebaseRef = new Firebase("https://app.firebase.io/some/data); firebaseRef.on('value', function(dataSnapshot){ var armLength = dataSnapshot.val().length; console.log(armLength); $scope.length = armLength; $scope.place = dataSnapshot.val(); if (armLength > 3){ document.getElementById("arms").style.backgroundImage = 'u...
ادامه مطلبVote count: 0 I have this navbar hider script for handheld devices: function bindNavUp() { var lastScrollTop = 0, delta = 5; $(window).on('scroll', function() { var st = $(this).scrollTop(); if(Math.abs(lastScrollTop - st) lastScrollTop) { // downscroll code $('header.main').css('top','-50px').hover(); } else { // upscroll code $('header.main').css('top','0'); }; lastScrollTop = st; }); }; function unbindNavUp() { $(window).unbind('scroll'); }; function handleNavUp() { if ($(window).width() < 1600) { bindNavUp(); } else { unbindNavUp(); }; }; $(document).ready(function() { var timer; $(window).on('load resize scroll', function() { clearTimeout(timer); timer = setTimeout(function() { handleNa...
ادامه مطلب