back soft

مطالب مرتبط با «using» در back soft | نویسنده: استخدام کار

Android-Facebook: How to share Youtube Video using ShareOpenGraphContent

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...

ادامه مطلب

Can't get a stream of Tweets using Twitter Streaming API on Spark

Vote count: 0 I am trying to do some analysis on Tweets using Twitter Streaming API. I first wanted to print the Status messages from stream, and start from there. My code is shown below: public static void main(String[] args) { SparkConf conf = new SparkConf().setAppName("TwitterStreamPrinter").setMaster("local"); Configuration twitterConf = new ConfigurationBuilder() .setOAuthConsumerKey(consumerKey) .setOAuthConsumerSecret(consumerSecret) .setOAuthAccessToken(accessToken) .setOAuthAccessTokenSecret(accessTokenSecret).build(); OAuth2Authorization auth = new OAuth2Authorization(twitterConf); JavaReceiverInputDStream twitterStream = TwitterUtils.createStream(ssc, auth); JavaDStream statuses ...

ادامه مطلب

I'm trying to upload image with Jquery and ajax function using codeigniter framework. i can see the error blow:

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_...

ادامه مطلب

blank page pops when i try to connect to database to create a simple login page using php and mysql using xampp

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! بخوانید...

ادامه مطلب

How to run a program before and after system reboot in Windows using commdline?

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! بخوانید...

ادامه مطلب

How would i display the total number of seats using the elements in the array?

Vote count: -3 I need help, i know my logic isn't the greatest right now but i'm trying to test things out so i can understand what my professor is asking for, anyways so i need to use the array classCtr from the header file to keep track of how many seats are actually sold then when the user enters -1 it displays it and so here it what i have so far! #include #include #include using namespace std; #include "C:UsersbartaOneDriveDocumentsVisual Studio 2015ProjectsProject 4Project 4array.h" void displayPlane(char msg[], char[ROW][COL]); void getData(int &, char &); void salesReport(int classCtr[]); int main() { int row = 0; char seat; while (row != -1) { displayPlane("tChesapeaake Airlines", l...

ادامه مطلب

How to pass JSON data to database using Django and django-jsonfield

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...

ادامه مطلب

Getting TypeError using Angular.js and Javascript

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...

ادامه مطلب

Cannot calculate PI using Chudnovsky algorithm

Vote count: 0 I was trying to calculate PI using Chudnovsky algorithm in Java: Java source I converted it from this Python source: Python source The Python version works, but I caot figure out why Java version doesn't. Please help me. Thank you. asked 59 secs agoEric K. White Let's block ads! بخوانید...

ادامه مطلب

Annoying error when importing and using JSON string from file

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...

ادامه مطلب

Selecting multiple files on Excel using the FileDialog

Vote count: 0 I'm trying to add multiple files when opening My Documents. I currently have a command button and when clicked the file dialog window is opened. I am able to select as many as I can, however when it is emailed to the address it only shows 2 attachments, the first one being the form on the spreadsheet and the second being the file chosen from the file dialog window. How can I add more than 2 attachments to my email? I've tried using a For Loop, so there can be many attachments, however this is not working. Please see below. Sub SbExtra_Attachment() 'mssgbox do you have another attachment to add ? Response = MsgBox(prompt:="Do you have any other attachments? 'Yes' or 'No'.", Butt...

ادامه مطلب

How to disply the calender before 3 months and after 3 months only from current date onwords using jquery

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! بخوانید...

ادامه مطلب

export to excel from table using angular js

Vote count: 0 I am using below code for export to excel:- $scope.exportData = function () { alert(document.getElementById('exportable').ierHTML); var blob = new Blob([document.getElementById('exportable').ierHTML], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}); saveAs(blob, "Report.xls"); }; it open excel with a waing message that xsl is not in correct format. The file could be corrupt or unsafe. Do you want to open it. Can anyone help me resolving this. And if there's no resolution with this plugin. Is there any other plugin that I can leverage for export to excel functionality in angular js.I need to export html table which has pagination.Any j...

ادامه مطلب

execute a query using entity manager

Vote count: 0 I have a query to get the size of databases I have. I have written the following: @SuppressWaings("unchecked") List results = (List)em.createQuery("SELECT sum( data_length + index_length ) / 1024 / 1024 "DataBaseSizeinMB" FROM information_schema.TABLES GROUP BY table_schema ").getResultList(); where em is the EntityManager. The query on its own runs successfully in myphpadmin. But when I run it in my java code, I get exception. Any idea what is wrong? Thanks. asked 1 min agoPegah Let's block ads! بخوانید...

ادامه مطلب

How to search for docx file and unzip it in the given directory using java?

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...

ادامه مطلب

Android Webview to PDF using PdfDocument

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...

ادامه مطلب

C decorator design pattern (using the pizza example)

Vote count: 0 I are taking a low level course in embedded systems and have been assigned the task of replicating some design pattes in C. I have gotten observer and delegator working I am really struggling with the decorator patte. I do realize that many people think that design pattes do not belong in a "low-level" language like C but I do not have an option - it needs to be done to pass this course. All the examples I have found are for OO programming languages. I'm using this Java pizza example as a basis (just retuing the cost to make it easy) but for the life of me caot get it to work: http://www.newthinktank.com/2012/09/decorator-design-patte-tutorial/ This is the UML for the example (...

ادامه مطلب

how to integrate c header files of ffmpeg into Xcode 9.2 using objective C

Vote count: -1 I am facing the problem while integrating the ffmpeg library into my Xcode project. I have successfully configure ffmpeg and lame library from terminal. Only I encounter the problem in the next i.e interating the ffmpeg library into my Xcode project.. Please help !! asked 4 mins agoNirbhay Let's block ads! بخوانید...

ادامه مطلب

Java: how to count distinct Strings in ArrayList without using Set?

Vote count: 0 How do you count the number of distinct Strings in an ArrayList without using the Set data structure in the Java libraries? I made two ArrayLists, one stored and one empty and want to store the empty one with distinct Strings. What am I doing wrongly? public void distinctCount (WordStream words) { ArrayList loaded = new ArrayList(); ArrayList empty = new ArrayList(); int count = 0; // Fill loaded with word stream for(String i : words) { loaded.add(i); } // Fill empty with loaded // Catch collisions for(int i = 0; i < loaded.size(); i++) { if(loaded.get(i) != empty.get(i)) { empty.add(loaded.get(i)); } } retu empty.size(); } edited 2 mins agoMaroun Maroun asked 4 mins agoNaomi 1...

ادامه مطلب

Configuring SSL in dropwizard using code

Vote count: 0 I'm using Dropwizard 0.7.0-rc2 for REST API. I have tried configuring SSL through config.yaml and it is working on local machine. Below is the content in config.yaml server: # softNofileLimit: 1000 # hardNofileLimit: 1000 applicationCoectors: - type: http port: 8080 - type: https port: 13790 keyStorePath: xxx.keystore keyStorePassword: xxx validateCerts: false validatePeers: false #this requires the alpn-boot library on the JVM's boot classpath #- type: h2 # port: 8445 # keyStorePath: xxx.keystore # keyStorePassword: xxx # validateCerts: false # validatePeers: false adminCoectors: - type: http port: 8081 - type: https port: 13790 keyStorePath: xxxx.keystore keyStorePassword: xx...

ادامه مطلب