back soft

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

create new variable using assign variable

Vote count: 0 I want to create a new variable using assign variable value in r just like a macro using in SAS. For example:- ID...

ادامه مطلب

How to find longest substring using Regular Expression in PHP

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

ادامه مطلب

using firebase to create a trading card game player

Vote count: 0 i've been trying to use firebase to create a simple 2 player generic trading card game player. however, i'm finding myself stuck on the client/server logic. i want the interfaces of the 2 players to display the board from their perspective (like you'd see on MTGO). in my pseudo coding, i've been toying with the following client-side logic: opponent.on("change-in-hand-or-board)",function(){ renderChangesInMyClient(); }) this makes sense to me logically, but i can't seem to translate the idea to code. specifically, what are best practices for storing and displaying two different perspectives on the same "board"? asked 54 secs agogabriel Let's block ads! بخوانید...

ادامه مطلب

Dynamic text with updating data using firebase (.on) and angular

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

ادامه مطلب

What is the point of using a getter?

Vote count: 0 I've just started leaing Java, and am struggling to understand the (seemingly uecessary) point of getters and setters. I'm following a tutorial on Codecademy, and it has asked me to create the method getAge(). What is the point in creating a method to get the age, when I could just run the line I wrote and commented out below? class Dog { int age; public Dog(int dogsAge) { age = dogsAge; } public void bark() { System.out.println("Woof!"); } public void run(int feet){ System.out.println("Your dog ran " + feet + " feet!"); } public int getAge() { retu age; } public static void main(String[] args) { Dog spike = new Dog(1); spike.bark(); spike.run(100); int spikeAge = spike.getAge(...

ادامه مطلب

I am wanting to print out the geolocation using geoplugin but it returned false

Vote count: 0 when I upload the file that contains this chunk of code to my website it retus false. I used unserialize before and it retued false before and after allow_url_open was On. It was on before I checked it was and it still retued false. Any ideas on how to fixed this please? Thank you. asked 22 secs agokylel9506 Let's block ads! بخوانید...

ادامه مطلب

How can I combine four "quarter pages" into one fullsize page using iTextSharp?

Vote count: 0 I want to create four repeating "templates" on a single PDF page. The "static" info in each quarter page will be the same, but there will be variable content that differs in each one. You can think of it as four "copies" of a login form or some such, but with the entries programmatically added, such as: Real name: B. Clay Shaon User name: Radicalia Password: thatDaedKatzenjammer Email address: clay@pigeon.com Real name: Albert L.B. Kollenbo User name: Grandpa Password: caseyJonesBigBrother1907 Email address: princealbertinacan@balpeenhammer.org (with another two at the right) I have code to create a document and add a paragraph like so: using (var ms = new MemoryStream()) { usi...

ادامه مطلب

How can i get the search value in textbox using ajax live search?

Vote count: 0 I Have Put all my code here. I take a div TextBoxContainer.When i am clicking on textbox name = DynamicTextBox i get the search value which are from database bt i cant select it and cant get it on textbox. function showResult(str) { if (str.length==0) { document.getElementById("livesearch").ierHTML=""; document.getElementById("livesearch").style.border="0px"; retu; } if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("livesearch"...

ادامه مطلب

Jquery nav bar hider script using lot of resources and generating console errors on Jquery 3 beta

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

ادامه مطلب

Making restrictions to selects using javascript [duplicate]

Vote count: 3 i have the following problem: I started to create a form with HTML an JS and there are two Dropdowns (Country and City). now i want to make these two dynamic with JQuery so that only the cities of the selected countries are visible. I've started with some basic JS which worked fine but makes some trouble in IE. Now i'm trying to convert my JS to JQuery for a better compatibility. My original JS looks like this: function populate(s1, s2) { var s1 = document.getElementById(s1); var s2 = document.getElementById(s2); s2.ierHTML = ""; if (s1.value == "Germany") { var optionArray = ["|", "magdeburg|Magdeburg", "duesseldorf|Duesseldorf", "leinfelden-echterdingen|Leinfelden-Echterdinge...

ادامه مطلب

HOW CAN I DO A RECURSIVE PRINT USING CLASS LINKED LIST

Vote count: -1 //PROTOYPE void Display(); //CALL list.Display(); /*********************************** * Print the contents of the list * ***********************************/ void EmployeeList::Display() { // Temporary pointer newEmployee * tmp; tmp = head; // No employees in the list if(tmp == NULL ) { cout...

ادامه مطلب

How to Netwok SQL Database using VB.Net

Vote count: 0 I created exam generator which generates exam and it also saves the result. What i aim is to have one database even if we use a lot of unit and I want to network the exam how can I be able to? asked 1 min agoYale This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....

ادامه مطلب

Zoom in and Zoom out on Camera View Using Objective-C?

Vote count: 0 How to Apply Zoom in and Zoom out On Camera view Using UIPinchGestureRecognizer and AVCaptureDevice. It is Not Zooming properly.Zoom Out is Not Working in My below Code : AVCaptureDevice *device =[AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeVideo]; AVCaptureDeviceFormat *format = device.activeFormat; CGFloat maxZoomFactor = format.videoMaxZoomFactor; const CGFloat pinchVelocityDividerFactor = 2.0f; if (pinchRecognizer.state == UIGestureRecognizerStateChanged || pinchRecognizer.state ==UIGestureRecognizerStateBegan) { NSError *error = nil; if ([device lockForConfiguration:&error]) { CGFloat desiredZoomFactor = device.videoZoomFactor + atan2f(pinchRecognizer.velocity, ...

ادامه مطلب

How can I make my modal draggable using an angularjs/jquery directive?

Vote count: 0 Here is the directive that I am using: angular.module('myapp').directive('draggable', function($document) { retu function(scope, element, attr) { var startX = 0, startY = 0, x = 0, y = 0; element.css({ position: 'relative', border: '1px solid red', backgroundColor: 'lightgrey', cursor: 'pointer', display: 'block', width: '65px' }); element.on('mousedown', function(event) { // Prevent default dragging of selected content event.preventDefault(); startX = event.screenX - x; startY = event.screenY - y; $document.on('mousemove', mousemove); $document.on('mouseup', mouseup); }); function mousemove(event) { y = event.screenY - startY; x = event.screenX - startX; element.css({ top: y +...

ادامه مطلب

Using compute Method for Calculating Values in Odoo Module customization?

Vote count: 0 My aim is to create a CRM-Lead extension module in Odoo. My modules aim is to add certain more fields to the Lead section in The CRM Odoo module. I created a module code which is working fine but one problem is that I have a field named percentage in it, which should calculate like amount * 100 & store in database. So for that I used compute attribute in Model. But its is not calculating the value... I will provide my code below :- from openerp import models, fields, api class legacy_sales(models.Model): _inherit='crm.lead' legacy_description = fields.Text(string="Comments") legacy_amount = fields.Float(string="Amount") legacy_startdate = fields.Date(string="StartDate") legacy_...

ادامه مطلب

How to know the "id responseObject" is an NSArray or an NSDictionary using AFNetworking

Vote count: 0 I'm using Objective-C and AFNetworking. I made a post request and it will retu a JSON string. I can get an NSDictionary like this:{msg="...", result="..."}, or an NSArray like this:{{id=1, content="..."},{id=2,content="..."}...}. So here's the thing: further tasks I need to do will differ according to the JSON String I get. How do I make the code tell whether the type of the JSON string is NSArray or NSDictionary? Here is my code: AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"]; [manager POST:url parameters:parameter progress:nil success:^(NSURLSessionDataTask *task, id respon...

ادامه مطلب

Responsive split screen using HTML and css

Vote count: 0 I'm a newbie to webdesign. What is HTML and CSS for creating a simple split screen layout? asked 3 mins agonafri This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....

ادامه مطلب

while using xcode 7 swift 2 implementing touches.Began()

Vote count: 0 when i try to run this statementlastpoint = touches.AnyObject().locationInView(self) it gives an error "value of type 'Set' has no member 'AnyObject'" please give suggestions asked 1 min agoMuhammad Bilal This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....

ادامه مطلب

How do I implement AppCompatActivity with NavigationDrawer and multiple fragments reusing same TabLayout?

Vote count: 0 I have successfully used TabLayout with AppCompatActivity with a CoordinatorLayout that looks close to this snippet: Now I have implemented a NavigationDrawer and I am struggling to implement tabs within one of the Fragments being shown inside my AppCompatActivity. I want to be able to switch with TabLayout between few child Fragments inside of this Fragment. How do I access TabLayout from one of my Fragments? How do I set PagerAdapter for each of the Fragments correctly? Where do I call addOnPageChangeListener? How do I hide TabLayout when one of my Fragments does not need to display tabs? asked 1 min agoxAF 1 Answer Vote count: 0 1. Switching between first-level Fragments Sup...

ادامه مطلب

How do I implement ls -l using Scala

Vote count: 0 I am trying to implement ls -l using Scala How do I get information such as file type, file mode bits, number of hard links, owner name, group name ? Also if the file is a is a symbolic link it should print the link as well eg lrwxrwxrwx 1 root root 30 Feb 17 01:03 fpu_control.h -> x86_64-linux-gnu/fpu_control.h I don't want to use JNI to call opendir() and other system calls and get the data. asked 2 mins agoVipin This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....

ادامه مطلب