|
Your question is not clear. These commands are part of the Android SDK and run on the PC not the Android device.
Member 13621117 wrote: how do I download and install a direct program from the site? What site are you talking about here?
|
|
|
|
|
So, I have a folder where it contains the files adb.exe, fastboot, logo, recovery ...
I want to know how to direct the commands using this folder.
example: in this folder, you have the file "LOGO.BIN" and need to push to the cell phone using this command "Fastboot flash logo logo.bin"
<pre>
OpenFileDialog openfile = new OpenFileDialog();
openfile.Filter = "IMG files|*.img";
openfile.Title = "Open a file..";
if (openfile.ShowDialog() == DialogResult.OK)
{
flashrecoveryTextbox.Text = openfile.FileName;
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.FileName = "fastboot.exe";
startInfo.Arguments = " flash logo.bin\"" + openfile.FileName + "\"";
process.StartInfo = startInfo;
process.Start();
Console.Text = Console.Text + process.StandardOutput.ReadToEnd();
}
how do I download and install a direct program from the site?
The site would be java using this link:
http://javadl.oracle.com/webapps/download/AutoDL?BundleId=230511_2f38c3b165be4555a1fa6e98c45e0808808
to download the new version of it and shows in the console
|
|
|
|
|
Member 13621117 wrote: how do I download and install a direct program from the site? I may be wrong but isn't that subverting the whole app-store model? I'm pretty sure that, unless you've rooted your device, there will be safeguards in place to prevent you from downloading and executing programs from potentially malicious sources.
This space for rent
|
|
|
|
|
You need to give the full pathname of fastboot in your startInfo.FileName . I have no idea what that link is supposed to represent, but if it is to download a file then you should do that manually. Alternatively you can use the WebRequest/WebResponse classes.
|
|
|
|
|
You're not understanding, especially as I'm using the translator.
My first doubt was how to run direct adb command from the console of my project I'm doing in visual studio in C #
in it will have 2 buttons, one to install the java drive so it needed to download directly from the site. java.com
the other button would only run the adb command, as if it were using the command prompt.
|
|
|
|
|
I have done a project that uses the stream class when I call the Position attribute, the error "Object reference not set to an instance of an object", I have done everything but can not fix this error, You help me to fix it. Thank you very much
Cộng đồng C Việt[^]
|
|
|
|
|
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself.
Let me just explain what the error means: You have tried to use a variable, property, or a method return value but it contains null - which means that there is no instance of a class in the variable.
It's a bit like a pocket: you have a pocket in your shirt, which you use to hold a pen. If you reach into the pocket and find there isn't a pen there, you can't sign your name on a piece of paper - and you will get very funny looks if you try! The empty pocket is giving you a null value (no pen here!) so you can't do anything that you would normally do once you retrieved your pen. Why is it empty? That's the question - it may be that you forgot to pick up your pen when you left the house this morning, or possibly you left the pen in the pocket of yesterdays shirt when you took it off last night.
We can't tell, because we weren't there, and even more importantly, we can't even see your shirt, much less what is in the pocket!
Back to computers, and you have done the same thing, somehow - and we can't see your code, much less run it and find out what contains null when it shouldn't.
But you can - and Visual Studio will help you here. Run your program in the debugger and when it fails, VS will show you the line it found the problem on. You can then start looking at the various parts of it to see what value is null and start looking back through your code to find out why. So put a breakpoint at the beginning of the method containing the error line, and run your program from the start again. This time, VS will stop before the error, and let you examine what is going on by stepping through the code looking at your values.
But we can't do that - we don't have your code, we don't know how to use it if we did have it, we don't have your data. So try it - and see how much information you can find out!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
here's my project
[^]
you try to help me. thanks
|
|
|
|
|
That's not the way this works. Griff has told you what the problem is, it's up to you to find out where the problem is. Fortunately for you, if you run your application inside Visual Studio, it will tell you which class and line the problem is. The application will crash at this point and the details will be written to the Output window. Go to that class, add some breakpoints and debug your code. This is your responsibility, not ours.
This space for rent
|
|
|
|
|
This is one of the most common questions of this forum - it means : you try to access something which is actually not existing.
To go a step further you could use your debugger and see which request gives you a NULL - there you will find your mistake ...
|
|
|
|
|
You can see classes as a template or blueprint from which to make (instantiate) objects.
Take for example a class Car which has some properties (speed, color, ...) that define it and some methods that make it do things (accelerate(), turn(), ...).
to make use of a "car" you need to define one (instantiate):
Car lambo = new Car();
Car volvo = new Car();
In this case we instantiated 2 (different!) objects based on the class (or template) "Car".
When it gives you the error you have, it means you're trying to call an object which has not yet been created.
Hope this helps.
|
|
|
|
|
But with the stream class we can not make streams u1 = new stream (), I do not understand why it is
This is my project, you look through to help me solve the problem. Thank you
link download: https://drive.google.com/open?id=1PsE7DKcZZ7si3R0SIZiBCkzoavnwlBUb
|
|
|
|
|
No-one is going to download your code, and the problem is caused by environment...usually what the inputs are and even with your code we still don't know your inputs. Add to that we don't know what you want to happen when this situation occurs....either it is an error that should never happen, or an error that might happen and needs to be handled, both have different solutions so even if we knew the line and we could at least make some guesses about what the problem might be we still couldn't give you a solution.
If you can't even say what line the error occurs on then fixing it is probably beyond you and you should pay someone to look at your code and fix it, this site is not where you post your code, give no relevant information and think someone is going to take time out of their day to help you.
|
|
|
|
|
You can't instantiate an instance of Stream because it's an abstract class. It's expecting you to instantiate one of the many derived stream classes, such as MemoryStream . If you have a class that you can't instantiate, it's either a static class or it's abstract. A quick review of the documentation[^] would have told you that Stream was abstract .
This space for rent
|
|
|
|
|
As stated by other members, no will solve YOUR problem, you will have to do that yourself. We do however lend a helping hand in nudging you in the right direction.
I suggest you google "C# Stream class" and read up on how it actually works.
|
|
|
|
|
Good evening I have a problem with my XAML designer. I find this error:
System.ArgumentNullException
The value can not be null.
Parameter name: remoteValues
to Microsoft.Expression.DesignHost.Isolation.Remoting.LocalNotifyingEnumerable`2..ctor (IRemoteNotifyingEnumerable`1 remoteValues, Func`2 converter)
to Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerView.Microsoft.Expression.DesignHost.IDesignerView.get_RelatedDocumentPaths ()
to Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo (CancellationToken cancelToken)
|
|
|
|
|
var usersWithRoles = (from user in context.Users
select new
{
UserId = user.Id,
Username = user.UserName,
Email = user.Email,
RoleNames = (from userRole in user.Roles
join role in context.Roles on userRole.RoleId
equals role.Id
select role.Name).ToList()
}).ToList().Select(p => new Users_in_Role_ViewModel()
{
UserId = p.UserId,
Username = p.Username,
Email = p.Email,
Role = string.Join(",", p.RoleNames)
});
guide me how could i compose the above query using lambda if possible. thanks
|
|
|
|
|
You already have a Lambda in there:
Select(p => new Users_in_Role_ViewModel() So what help do you need?
And why are you converting things to List<T> so often? All that does is "collapse" the iteration, which wastes time and memory space...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
you said :- why are you converting things to List<t> so often? All that does is "collapse" the iteration, which wastes time and memory space...
so tell me which area need to change in query?
|
|
|
|
|
Sir Morning,
you said "And why are you converting things to List<t> so often? All that does is "collapse" the iteration, which wastes time and memory space..."
which still not clear that what you try to say?
are pointing why i use tolist()...what problem may occur for this. please make me aware in details so i may avoid this kind of mistake in future. thanks
|
|
|
|
|
Linq queries and Linq methods aren't executed immediately, they use something called "Deferred execution" which (basically) means that nothing is done until you actually need the final results.
There is a basic example of this here: Deferred Execution Example (C#) | Microsoft Docs[^]
Deferred execution means better efficiency (sometimes) because you can "combine operations" instead of having to loop each time to produce the intermediate result which you then pass to the next section of the evaluation. Remember: Linq isn't "no loops" it's about "hiding loops" where you can't see them and evaluating them only when it has to.
But ... when you say "ToList" you are explicitly requesting an object be created holding the whole results - so the whole operation has to be performed immediately to generate the collection you asked for. So when you then continue to process it, you need to do another loop to process the next operation.
Every time you call ToList, you make Linq work harder, and that takes both more time, and uses more memory. Only ever "Collapse the operation" when you actually need the results!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Something like this should work:
var usersWithRoles = context.Users
.Select(user => new
{
UserId = user.Id,
Username = user.UserName,
Email = user.Email,
RoleNames = user.Roles.Join(context.Roles, userRole => userRole.RoleId, role => role.Id, (userRole, role) => role.Name)
})
.AsEnumerable()
.Select(p => new Users_in_Role_ViewModel
{
UserId = p.UserId,
Username = p.Username,
Email = p.Email,
Role = string.Join(",", p.RoleNames)
});
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
thank you sir 
|
|
|
|
|
sir,
you use .AsEnumerable() where as i used .ToList()....what would be the difference in term of performance of using .AsEnumerable(). if possible please explain this one with a easy example that what will happen internally to use .ToList() which causes performance issue.
tell me if i write this way then what will be the performance
var usersWithRoles = (from user in context.Users
select new
{
UserId = user.Id,
Username = user.UserName,
Email = user.Email,
RoleNames = (from userRole in user.Roles
join role in context.Roles on userRole.RoleId
equals role.Id
select role.Name)
}).ToList().Select(p => new Users_in_Role_ViewModel()
{
UserId = p.UserId,
Username = p.Username,
Email = p.Email,
Role = string.Join(",", p.RoleNames)
});
just inner tolist function......does it increase performance ?
you code as follows
var usersWithRoles = context.Users
.Select(user => new
{
UserId = user.Id,
Username = user.UserName,
Email = user.Email,
RoleNames = user.Roles.Join(context.Roles, userRole => userRole.RoleId, role => role.Id, (userRole, role) => role.Name)
})
.AsEnumerable()
.Select(p => new Users_in_Role_ViewModel
{
UserId = p.UserId,
Username = p.Username,
Email = p.Email,
Role = string.Join(",", p.RoleNames)
});
this is your join which not clear to me.
RoleNames = user.Roles.Join(context.Roles, userRole => userRole.RoleId, role => role.Id, (userRole, role) => role.Name)
the join is happening between which tables ?
if re-write this way then what will be performance
List<Users_inRole_ViewModel > usersWithRoles= db.Users.Include(a => a.Roles).Select(p =>
new Users_inRole_ViewModel {
UserId = p.Id,
Username = p.UserName,
Email = p.Email,
Role = string.Join(",",
db.Roles.Where(c=> p.Roles.Any(d => d.RoleId == c.Id )).Select(u=>u.Name).ToList() )
}
);
please help me to understand few points which i have mention here. thanks
modified 24-Jan-18 6:55am.
|
|
|
|
|
please tell me how i can plot contour plot from visual studio data in c#
|
|
|
|
|