Vote count: 0 I am trying to pass a python dictionary to a rabbitmq queue via pika, this is probably a python problem and not rabbitmq itself. I am getting an error as stated above and here is my code: def PingAddScan(deviceID, ipAddress, deviceHistory, item, date, apiURL, browserConId): if PingDevice(deviceID, ipAddress): BasicScan(ipAddress, deviceID, item, apiURL) deviceHistory[deviceID] = date # After the basic scan we are going to need to push a message back to the user to say # that the pathfinder has successfully found the device, and it should prompt the user # what he wants to scan print browserConId + " : " + deviceID chaelOutbound.queue_declare(queue='outboundMessaging', durable=T...
ادامه مطلبVote count: 0 Hi in my code below i am trying to convert xml Data to Json Object. using converted Json Object i am trying to create a table using angularjs. so here the problem is i am able to bind complete converted json object {{employeeList}} but failed to load individual atttribute of json object i.e.,{{metric.EmpId}}. finally from my observation i found when the converted json object is directly asigned to $scope.Employees="Employee": [ {"EmpId": "4", "Name": "Chris", "Sex": "Male", "Phone": [ { "_Type": "Home", "__text": "564-555-0122" }, { "_Type": "Work", "__text": "442-555-0154" } ], "Address": { "Street": "124 Kutbay", "City": "Montara", "State": "CA", "Zip": "94037", "Country": "U...
ادامه مطلبVote count: 0 I have an endpoint in my Web API 2 that gets a user by useame. Unfortunately if the useame has a period '.' in it I get an HTTP 404.0 error (the resource you are looking for is not found). However if I use the same test in Postman without the period character '.' it does actually route to the proper endpoint and tries to find the user passed. So, "joe.doe" gives me a 404 error but "joedoe" does not. I tried to Html encode it but it does not work either as the period character is not escaped even when I force it to be escaped to '%2e'. Strange as it may seem most other characters can be escaped, e.g. %20 - space, %60 - grave accent, etc. Is there a solution to this or do I just ...
ادامه مطلبVote count: 0 I am trying to use TLS in pjsua app, but i get an error here: try{ ep.transportCreate(pjsip_transport_type_e.PJSIP_TRANSPORT_TLS, sipTpConfig); } catch (Exception e) { System.out.println(e); } The error is: Code: 171060 unsupported transport (pjsip_eunsuptransport). Do you know something about it? asked 15 secs agoDragoș Grumeza Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I've found many similar questions regarding this but anything I try won't work. I'm trying to run a MySQL query using the variable $epost. When I echo this variable it displays correctly, but the query retus nothing. Entering a fixed value for $epost like: $epost='email@email.com' Retus the correct query from the database. $epost=mysqli_real_escape_string($co,$_POST['email']); echo $epost; $sql = "SELECT memberID FROM Member WHERE email = '$epost' limit 1"; $result = mysqli_query($co,$sql); $row = mysqli_fetch_assoc($result); echo $row["memberID"]; asked 30 secs agoMarhabba Let's block ads! بخوانید...
ادامه مطلبVote count: 1 I want to keep a toggle function for ul li a. In magento I used the below coding to fetch level 1 and level 2 subcategories in layered navigation:...
ادامه مطلبVote count: 0 This below code works perfectly in vb 2005 but can't work in .net 1.1. Private Function GetActiveDirUserDetails(ByVal useame As String) As String Dim dirEntry As System.DirectoryServices.DirectoryEntry Dim dirSearcher As System.DirectoryServices.DirectorySearcher Try dirEntry = New System.DirectoryServices.DirectoryEntry("LDAP://123.45.67.89:101/DC=mydomain,DC=com") dirSearcher = New System.DirectoryServices.DirectorySearcher(dirEntry) dirSearcher.Filter = "(samAccountName=" & useame & ")" Dim sr As DirectoryServices.SearchResult = dirSearcher.FindOne() If sr Is Nothing Then Retu False End If Dim de As System.DirectoryServices.DirectoryEntry = sr.GetDirectoryEntry() 'Dim firstn...
ادامه مطلبVote count: 0 I am trying to run a job at every 20 seconds. I am using whenever gem but as per its documentation it allows minimum 1 minute of time. scheduler every 1.minute do ruer "DailyNotificationChecker.send_notifications" end job i thought i can use sleep method and make it sleep for 20 seconds but then it will go to infinite mode and what will happen if my cron will it this method again. class DailyNotificationChecker def self.send_notifications Rails.logger.info "Triggered NotificationChecker" if RUN_SCHEDULER == "true" Rails.logger.info "Ruing Performer" notes = Note.unprocessed if notes.present? notes.each do |note| RealtimeNotificationChecker.performer(note.user_id,"note_created")...
ادامه مطلبVote count: 0 i need to repeat same row of data frame for n number of times and row bind them to new data frame. I can easily do it using for loop, but it has more computational time. Can some one help me this doing using any of apply functions. Below one is the prototype of my code. testdata...
ادامه مطلبVote count: 0 Since most browsers has HTML5 enabled, tracking the current device and displaying it on the map is possible, however, is there a function for a webapp based device, to update a central database on it's location? My theory is that a user can POST a form to upload it's co-ordianates, but this would cause it to be slightly of an hassle. Is there a way, preferably automated, to track a user's geolocation in real time, through a web app? Before all the downvotes come in, I would like to clarify that yes, I am able to track myself and get geolocation working on my device. What my intention is, is to track others and receive the value, something like a tracker. asked 1 min agoC.oast L...
ادامه مطلبVote count: 0 I have two columns ID (NUMBER), DESCRIPTION (VARCHAR2(4000)) in Origional Table DESCRIPTION column has multiline strings. I need to extract dates from each line of the string and also need to find earliest date. so the result would look like in Expected result table.. Expected result, Original Table Using this query to_date((regexp_substr(A.Description , 'd{1,2}/d{1,2}/d{4}')), 'MM-DD-YYYY') I was able to extract date from the first line (Discontinued:09/10/2015:Rappaport Family Institute for Research:;) only, but not from the other two. asked 29 secs agos.pat Let's block ads! بخوانید...
ادامه مطلبVote count: -4 Title says it all please make sure you submit code in C only =) already tried using name char [30] but cant mix it with else/if condititons. Thank You iC. edited 21 secs agoFUZxxl asked 1 min agoiCastiel Let's block ads! بخوانید...
ادامه مطلبVote count: 0 So I was trying to convert pixel to spatial coordinates when i found the package image_geometry. So i decided i would try to use it, i initialized it, and called the desired function, taken fro the API. Here's what i did import image_geometry from image_geometry import PinholeCameraModel self.img_geo = PinholeCameraModel() (r_x,r_y,r_z) = self.img_geo.projectPixelTo3dRay((359,285)) print(r_x) Obviously the self.img_geo is in my init function and then later on i use the projection function, and then get that error. Any ideas whats wrong? asked 24 secs agolaurent Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I would like to make line chart in my project. i was already make pie chart using datavisulazation dll but now want to make line chart with dynamic data so how can i make it? asked 1 min agoUrvish Patel Let's block ads! بخوانید...
ادامه مطلبVote count: -1 We are developing eCommerce website from scratch just like amazon.com, ebay.com, flipkart.com. We need very fast searching so we chosen Mongodb as a backend. Now we want to know which is the best architecture to follow? I have read about N-tire architecture and Onion architecture, but very confused here to find which is best for us. asked 59 secs agoRKS Let's block ads! بخوانید...
ادامه مطلبVote count: 0 my xml file contains: iam trying to read and write this xml file in the same file, but in the output the attributes position is shuffled like this it is kind of a weird problem. Any help is appreciated. asked 23 secs agoSrikanth Togara Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I created my Twitter App using PHP, but I don't know how to add parameters in Twitter API, my code: $twitter_url = 'https://api.twitter.com/1.1/users/show.json'; // do not change it! $data = array('oauth_consumer_key' => $consumer_key, 'oauth_nonce' => time(), 'oauth_signature_method' => 'HMAC-SHA1', 'oauth_timestamp' => time(), 'oauth_token' => '492687736-xxxxxxxx', 'oauth_version' => '1.0'); $baseString = buildBaseString($twitter_url, $data); $compositeKey = $consumer_secret."&xxxxxxxx"; oauth_signature = base64_encode(hash_hmac('sha1', $baseString, $compositeKey, true)); $data['oauth_signature'] = $oauth_signature; $response = sendRequest($data, $twitter_url); $json = json_d...
ادامه مطلبVote count: 0 I am developing an app in .net framework using c# which integrate Facebook. I have following requirements for my app User can login to Facebook account User can view Friends list, Messages & Notifications. I successfully completed my 1 requirement. There is problem with 2 requirement which I shown below-- public void Show_Friends() { try { fbclient = new FacebookClient("https://graph.facebook.com/endpoint?key=value&access_token=MyappId|MyAppSecret"); dynamic friendslist = fbclient.Get("/me?fields=friendlists");//Here exception occours int numberOfFriends = (int)friendslist.data.Count; for(int i = 0; i < numberOfFriends; i++) { friendsListBox.Items.Add(friendslist.data[i].na...
ادامه مطلبVote count: 0 I want to create a counter in a routine that will count how many times a specific entry has appeared so far. The routine that i have created so far populates data in a spreadsheet through a For..Next Loop. For each of these rows i have an extra column that will represent the counter and count how many times a characteristic of the entry row has appeared so far in the previous rows. For that, I am using the application.worksheetfunction.CountIf function but the reference range has to be dynamic. The function that i created is as follows: Public Function ReCounter(Rng as range, recat as string) as integer Dim i as integer, j as integer, ReCounterArr() as string for j=1 to i 'wher...
ادامه مطلبVote count: 0 I am quite good at docker. I need your views regarding what approach should I follow for the following: I need to build a distribution tarball of a package X. The obvious steps are : $ git clone X && cd X # get source $ ./autogen.sh # install some extra packages for building project $ ./configure $ make $ make test $ make dist # create tarball As part of the application requirement, I need to get the output and success flag of each above command. I have the following two approaches: Make a dockerfile using a base image of a distro and include all the above steps in it. And, finally export the tarball. The process will fail if any intermediate step is failed. But using this appr...
ادامه مطلب