back soft

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

c# using statement with asynchronous Task inside not await

Vote count: 0 I created an IDisposable object that log the execution time on Dispose. Then, I created a RealProxy that uses this object to log the time of any method call of my business class My business class uses async methods, which then leave the using statement before completion of the task, and then log wrong execution time. Here's my code: /// /// Logging proxy with stopwatch /// /// public sealed class LoggingProxy : RealProxy// where T : MarshalByRefObject { private ILog _logger; private readonly T _instance; private LoggingProxy(T instance, ILog logger) : base(typeof(T)) { _logger = logger; _instance = instance; } /// /// Create the Transparent proy for T /// /// An implementation ...

ادامه مطلب

Do robots refer to User Agent in robots.txt using OR or AND manner

Vote count: 0 Let's say I have list of user agents in my robots.txt like User-agent: Applebot Disallow: something User-agent: baiduspider Disallow: something User-agent: Bingbot Disallow: something User-agent: * Disallow: something Would bots reference User Agents in OR maer or AND maer? If Bingbot crawls this site, do Bingbot rules and * rules apply together? edited 18 secs agoMatt Raines asked 2 mins agoEnglishMaster 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....

ادامه مطلب

Search using dynamically created anchor href in laravel

Vote count: 0 I want to include a dynamicaly created anchor that links to a search page that displays all users from that company. Users are allowed to be affiliated with more than one company. The information is being pulled from a mysql database example: John Doe is affiliated with: Pepsi Company Cold Drinks Inc Company Sports Drinks Company John Doe is affiliated with: Pespi Company Cold Drinks Inc Company Sports Drinks Company 1.Whats the best way to go about doing this. 2.Whats the best way to structure my database. Should I use a single column for each affiliation or put all the affiliations in one. edited 3 mins agoKA_lin asked 5 mins agoLuna This entry passed through the Full-Text RS...

ادامه مطلب

SPOJ VPALIN using trie

Vote count: -3 Ive solved SPOJ VPALIN using KMP. However based on the comments it can also be solved using a trie. How can this problem be approached using tries. Problem Link asked 2 mins agosie 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....

ادامه مطلب

What is error in my code ?? I Want Retrieve Customer Information using

Vote count: 0 Profile Sharing Server-Side Integration (PayPal-iOS-SDK) Retrieve Customer Information Using a Valid Access Token. but it is not working (customer Information not fetch what is issue in my code. if any idea and code please help me ) $access_token = "A103.9RZJFEa4fW5sQOX6DFsfTTH1tCPV_Om-icjqwrzzi2e1n7Jd_iFYBkrCCK_2ENsg.W5-JERJfcL6VphiZEbjeOLA-IAe"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.paypal.com/v1/identity/openidcoect/userinfo/?schema=openid"); curl_setopt($ch, CURLOPT_HEADER, "Content-Type:application/json"); curl_setopt($ch, CURLOPT_HEADER, "Authorization: Bearer ".$access_token); $result1 = curl_exec($ch); curl_close($ch); print_r($result1);die; aske...

ادامه مطلب

Using Tableview to display items in descending order with childByAutoId

Vote count: 0 I am trying to display a data set in descending order by snap.key in a firebaseUi TableView Firebase *firebaseRef = [[Firebase alloc] initWithUrl:@"firebaseio.com/data"]; self.dataSource = [[FirebaseTableViewDataSource alloc] initWithRef:firebaseRef cellReuseIdentifier:@"cell" view:self.tableView]; [self.dataSource populateCellWithBlock:^(UITableViewCell *cell, FDataSnapshot *snap){ // Populate cell as you see fit, like as below cell.textLabel.text = snap.value[@"Data"]; }]; asked 3 mins agoJonathan Caraveo 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-on...

ادامه مطلب

flask restful: how to give multiple arguments to get methhod of any Api using flask restful?

Vote count: 0 the following is my code for get method: def get(self, ques_no, i): j=i opt_dict = {} for ques in session.query(Options.optn).filter(Options.q_no == ques_no)[j:j+2]: opt_dict.update({i:ques.optn}) i=i+1 retu jsonify(opt_dict) api.add_resource(store_option, '/option/&&', endpoint = 'option_id') i need to pass to arguments to my get method to access the database. but i'm not able pass to arguments. how can i do that?? any help will be appreciated.. asked 3 mins agoManish Kumar 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 to deploy a single asp.net web page using IIS?

Vote count: 0 How to deploy a single asp web page using IIS? I know How to create an asp.net website using IIS. Thanks in advance, asked 1 min agoAnisha 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....

ادامه مطلب

Using Pre-processor Macro,how to change file name for Development, staging and production Environment ?

Vote count: 0 Problem statement:- I am using third party library, which need to have config.plist(name must be same), Config.plist have several key-value pairs, for production,Dev and stating environment, values for key does change. Right now i need to manually change file Name, like if i need to run app in production environment, i do change file name ConfigPROD.plist into Config.plist, for Staging i do change file name from ConfigDev.plist into Config.plist. Need Solution like:- can i change, file content using preprocessor macro, like #if isProductionBuild == 1 #define kBaseURL @"https://api.base.com/bart/" #define kEnvironmnet @"PROD" ***//copy ConfigPROD.plist file content into Config.p...

ادامه مطلب

How display response using pre tag?

Vote count: 0 i have some response generated in the textarea . I need avoid the textarea(inputbox) and need to display the reponse using a pre tag asked 3 mins agoJayakrishna 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....

ادامه مطلب

Cannot click on styled link while using smartphone

Vote count: 0 Regarding the problem occurred while accessing via a smartphone, please check the site apkrec.com i have problem with CSS and JS on my site above while i open it from smartphone i caot click or tap feed link and category link (styled link). Image feed link : feed link While i click or tap it, the button is gone. I don't know what's wrong. I also get problem with error code below g.offset(...) is undefined i use modeizr k.css({top:(g.offset().top+g.outerHeight()+10),left:g.offset().left,width:d}); asked 1 min agoHeawan 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...

ادامه مطلب

How to interact with background using UISearchController in swift?

Vote count: 0 Currently i am using UISearchController.becomeFirstResponder() to present the keyboard when the app is first launched. I am also using UISearchController.obscuresBackgroundDuringPresentation = false to display the background with the keyboard. However, currently i am not able to interact with the background views or use gesture recognition such as swipe or tap? Is there a way to fix this? Thanks for the help! asked 1 min agouser37375 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....

ادامه مطلب

I'm using node mailer, and I get this message and no content,Email encryption in transit (TLS)

Vote count: 0 I'm using node mailer and I caot get content on my email,I'm trying to get all the input content, from the client, to send it to my email so I can review it, but I do receive an email but no content. is there anything i have to change on my code??? var http = require('http'); var express = require('express'); var nodemailer = require("nodemailer"); var bodyParser = require('body-parser') var app = express(); var port = Number(process.env.PORT || 5000); app.use(bodyParser.json()); // to support JSON-encoded bodies app.use(bodyParser.urlencoded({ extended: true })); // Home page app.get('/', function(req, res) { res.sendfile('index.html'); }); // sending mail function app.post('/...

ادامه مطلب

Saving JSON data using Laravel Transformer

Vote count: 0 I am working on an API that is pulling data from an xml file then decode it into json, how would the store method look like in the controller? I have tried storing the json into my DB with code below, but i cant get to a point were the json gets saved into the DB public function store(Request $request) { $fileContents = file_get_contents('/path/to/my.xml'); $simpleXml = simplexml_load_string($fileContents); $json = json_encode($simpleXml, true); Vacancy::create($json); } This is my Vacancy Model class Vacancy extends Model { protected $fillable = ['requisition', 'position_title', 'experience']; I understand that the index method would look like this public function index() { $v...

ادامه مطلب

File not saved on different computer using outputstream and jfilechooser

Vote count: 0 I am trying to edit inside a .xls file using Apache poi library. All the updation is succesfull on local computer.But, i am stuck when jar file of application does not saved excel file on computer on which it is installed. FileChooser fileChooser = new FileChooser(); fileChooser.setTitle("Generated data of Dvat "); fileChooser.setTitle("Generate XLS File of " + "Dvat 31"); fileChooser.getExtensionFilters().addAll( new ExtensionFilter("XLS Files", "*.xls")); fileChooser.setInitialFileName(Common .replaceWhiteSpaceAndSlash("Dvat31") + "_" + Common.replaceWhiteSpaceAndSlash(Common.comp.getName()+"_") +this.fromdate+"_"+this.todate+ ".xls"); fileChooser.setInitialDirectory(new File...

ادامه مطلب

Beginner Python - Printing 3 different responses based on age using a while loop

Vote count: 0 Teaching myself Python out of a book and I'm stuck on this exercise: A movie theater charges different ticket prices depending on a person’s age. If a person is under the age of 3, the ticket is free; if they are between 3 and 12, the ticket is $10; and if they are over age 12, the ticket is $15. Write a loop in which you ask users their age, and then tell them the cost of their movie ticket. I know how to make it work without using a loop but I am a uncertain how to make it work using a while loop. Any advice or examples would be greatly appreciated. asked 3 mins agoiriejams This entry passed through the Full-Text RSS service - if this is your content and you're reading it on ...

ادامه مطلب

Using animations in fragments of PagerAdapter

Vote count: 0 I am trying to do SwipeViews with some animations in each fragment. For example I would like to change alpha of button from 0 to 1. I wrote animation And I have working PagerAdapter with fragmets like this public class FragmentOne extends Fragment { private Button bw; private Animation anim; private Context CON; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub CON=container.getContext(); View vw = inflater.inflate(R.layout.fragemnt1,container,false); bw=(Button)vw.findViewById(R.id.button); anim= AnimationUtils.loadAnimation(CON,R.anim.animacia); bw.startAnimation(anim); retu inflate...

ادامه مطلب

Using NumberFormatException in JTextField

Vote count: 0 So my program asks the user to input two integers then if the user inputs a string it will display an error message "Invalid! Please input an integer". But after the error message shows up it displays an error. This is the error but I managed to convert the JTextField to String then to Integer Exception in thread "main" java.lang.NumberFormatException: For input string: "a" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.parseInt(Integer.java:615) at SimpleCalculator1.main(SimpleCalculator1.java:52) And this is my code import javax.swing.*; public class SimpleCalculator1 { publ...

ادامه مطلب

allocate users by tiers using Pig on Hadoop

Vote count: 0 Need to count the # of users in each group, and group allocation for each user is based on their payment they made. Here is my current code, wondering if any ways to make it more elegant? Is it possible to complete the logic by one group by statement? Thanks. customer_group = group clicks by customerID; customer_payment_count=foreach customer_group generate customerID, COUNT(payments) as payment_amount; tier1 = filter customer_payment_count by payment_amount...

ادامه مطلب

how to inject a delegate in swift using typhoon?

Vote count: 0 Using typhoon i inject the property of a Viewcontroller like below: //in typhoon Assembly class i inject the property of SomeViewController to a singleton instance of foo public dynamic func fooViewController() -> AnyObject { retu TyphoonDefinition.withClass(MyViewController.self) { (definition) in definition.injectProperty("worker", with: foo()) definition.scope = TyphoonScope.Singleton } } //my protocol @objc protocol someProtocol { optional func hasFinishedWork(value: Bool) optional func doSomeWork() } //a class that does something class foo{ var delegate:someProtocol? func doSomething(){ //how can i set delegate from the viewController? delegate?.hasFinishedWork!(true) } } ...

ادامه مطلب