How to download youtube api jar for android
im trying to use youtube api codes but i cant find from where i download
the correct jars.
I got to this page:
https://code.google.com/p/google-api-java-client/wiki/APIs#YouTube_Data_API
I downloaded the file but i got there many jars and on the developers site
its not wrinten which jars i should import.
I trired to import the file called:
google-api-services-youtube-v3-rev77-1.17.0-rc from the root folder but
when i try to use sample code eclipse cant find the imports.
The sample code is here:
https://developers.google.com/youtube/v3/code_samples/java#search_by_keyword
When im trying to use
private static final JsonFactory JSON_FACTORY = new JacksonFactory();
Eclipse cant find from to import the files.
I dont understand why using youtube api should be so complicated. why not
putting all the code on one simple jar.
Sunday, 15 September 2013
Trying to obtain memberof detail from linux ldapsearch command
Trying to obtain memberof detail from linux ldapsearch command
I am trying run an LDAP query from a Linux machine (CentOS 5.8) to a
Windows LDAP server and want to get 'memberof' detail for a user. In this
example, the Domain is cm.loc and the user is admin1@cm.loc. Here is the
ldapsearch syntax I am using. It returns an error. Can someone point me in
the right direction with what the correct syntax should be using
ldapsearch to query for memberof detail for a particular account?
Here is what I am using that returns error; "ldap search ext bad search
filter 7" Where is my syntax wrong?
ldapsearch –x –h 192.168.1.20 –b 'DC=cm,DC=loc' -s base –D 'admin1@cm.loc'
-W '(&(objectCategory=Group)(|(memberOf=group1)(memberOf=group2)…))'
Thank You
I am trying run an LDAP query from a Linux machine (CentOS 5.8) to a
Windows LDAP server and want to get 'memberof' detail for a user. In this
example, the Domain is cm.loc and the user is admin1@cm.loc. Here is the
ldapsearch syntax I am using. It returns an error. Can someone point me in
the right direction with what the correct syntax should be using
ldapsearch to query for memberof detail for a particular account?
Here is what I am using that returns error; "ldap search ext bad search
filter 7" Where is my syntax wrong?
ldapsearch –x –h 192.168.1.20 –b 'DC=cm,DC=loc' -s base –D 'admin1@cm.loc'
-W '(&(objectCategory=Group)(|(memberOf=group1)(memberOf=group2)…))'
Thank You
Stuck with mootools script. Image autochange
Stuck with mootools script. Image autochange
<div id="contentimage">
<img src="1.jpg" class="activeimage" />
<img src="2.jpg" style="opacity: 0;" />
<img src="3.jpg" class="last" style="opacity: 0;" />
</div>
<script>
window.addEvent('domready', function() {
var fx = function() {
var activeimage = $$('img.activeimage');
if(!activeimage.hasClass('last')) {
var next = activeimage.getNext('img');
activeimage.toggleClass('activeimage');
next.toggleClass('activeimage');
activeimage.morph({'opacity':'0'});
next.morph({'opacity':'1'});
} else {
var next = $('contentimage').getFirst('img');
activeimage.toggleClass('activeimage');
next.toggleClass('activeimage');
activeimage.morph({'opacity':'0'});
next.morph({'opacity':'1'});
}
}
fx.periodical(3000);
});
</script>
I just can't understand why this :
if(!activeimage.hasClass('last'))
always returns false ? I tried to check it with "alert", and it was all
good, but when it comes to this line - it goes not like I expected.
<div id="contentimage">
<img src="1.jpg" class="activeimage" />
<img src="2.jpg" style="opacity: 0;" />
<img src="3.jpg" class="last" style="opacity: 0;" />
</div>
<script>
window.addEvent('domready', function() {
var fx = function() {
var activeimage = $$('img.activeimage');
if(!activeimage.hasClass('last')) {
var next = activeimage.getNext('img');
activeimage.toggleClass('activeimage');
next.toggleClass('activeimage');
activeimage.morph({'opacity':'0'});
next.morph({'opacity':'1'});
} else {
var next = $('contentimage').getFirst('img');
activeimage.toggleClass('activeimage');
next.toggleClass('activeimage');
activeimage.morph({'opacity':'0'});
next.morph({'opacity':'1'});
}
}
fx.periodical(3000);
});
</script>
I just can't understand why this :
if(!activeimage.hasClass('last'))
always returns false ? I tried to check it with "alert", and it was all
good, but when it comes to this line - it goes not like I expected.
SQL: Join value from another table
SQL: Join value from another table
I have 1 table called accounts and another one called level_points
Basically the idea is to determine what is the minimum amount of points
you need to be X level.
Account Structure
id, name.. etc. points
Level_Points Structure
level, points
Values in here such as
(1, 5) (2, 10) (3, 15)
I'm able to calculate the level using this query
"SELECT level FROM level_points WHERE points <= (SELECT points FROM
accounts WHERE id = 'x') ORDER BY level DESC LIMIT 1"
My problem is that now i'm trying to join the tables to get something like
this (For every user in the accounts table)
Result:
For user 1: id, name etc... points, level For user 2: id, name etc...
points, level For user 3: id, name etc... points, level
I'm not exactly sure how to do this using joins and I can't seem to find
an answer here that helps me here. Thanks.
I have 1 table called accounts and another one called level_points
Basically the idea is to determine what is the minimum amount of points
you need to be X level.
Account Structure
id, name.. etc. points
Level_Points Structure
level, points
Values in here such as
(1, 5) (2, 10) (3, 15)
I'm able to calculate the level using this query
"SELECT level FROM level_points WHERE points <= (SELECT points FROM
accounts WHERE id = 'x') ORDER BY level DESC LIMIT 1"
My problem is that now i'm trying to join the tables to get something like
this (For every user in the accounts table)
Result:
For user 1: id, name etc... points, level For user 2: id, name etc...
points, level For user 3: id, name etc... points, level
I'm not exactly sure how to do this using joins and I can't seem to find
an answer here that helps me here. Thanks.
How to sort a given string "ORACLE" in ascending order in oracle?
How to sort a given string "ORACLE" in ascending order in oracle?
String="ORACLE"
Out Put Like "ACELOR"
How to write Query? or Pl/Sql Program?
String="ORACLE"
Out Put Like "ACELOR"
How to write Query? or Pl/Sql Program?
Saturday, 14 September 2013
Connect to Office 365 from objective-c
Connect to Office 365 from objective-c
Is it possible to connect to the Office 365 service and manage users via
objective-c ? Has anyone had any success with this before?
Is it possible to connect to the Office 365 service and manage users via
objective-c ? Has anyone had any success with this before?
MouseEnter ContextMenu.StaysOpen doesn't respond
MouseEnter ContextMenu.StaysOpen doesn't respond
I've build a WPF application that contains a button, which activates a
drop-down sub-menu. My intent for the button behavior was to make it so
when it is moused-over, the sub-menu appears and you can access it.
Likewise, when the mouse goes off it, the sub-menu disappears. Pretty
basic function.
I'm tried using the MouseEnter xaml and this is where my problem occurs. I
tell the contextmenu to stay open using ContextMenu.IsOpen = true , then
call ContextMenu.StaysOpen = false in the MouseLeave to close it.
private void AdminButton_MouseEnter(object sender, MouseEventArgs e)
{
(sender as Button).ContextMenu.IsEnabled = true;
(sender as Button).ContextMenu.PlacementTarget = (sender as Button);
(sender as Button).ContextMenu.Placement =
System.Windows.Controls.Primitives.PlacementMode.Bottom;
(sender as Button).ContextMenu.IsOpen = true;
(sender as Button).ContextMenu.StaysOpen = false;
}
private void AdminButton_MouseLeave(object sender, MouseEventArgs e)
{
(sender as Button).ContextMenu.StaysOpen = false;
}
The result is that once I mouse over the button, it stays active and the
submenu exists until I click elsewhere on the screen. I'm pretty confused
by this behavior, shouldn't the ContextMenu.StaysOpen = false close the
submenu?
I've already tried to use both MouseEnter/MouseLeave and the most common
behavior is that the second the cursor comes off the button to access the
submenu, the submenu disappears.
I figure if I can't make these commands work, there must be some way to
suspend the MouseLeave duration so the user can get to the submenu before
it closes???
not many examples on the web concerning this action for a button or
textblock, so any help would be great.
I've build a WPF application that contains a button, which activates a
drop-down sub-menu. My intent for the button behavior was to make it so
when it is moused-over, the sub-menu appears and you can access it.
Likewise, when the mouse goes off it, the sub-menu disappears. Pretty
basic function.
I'm tried using the MouseEnter xaml and this is where my problem occurs. I
tell the contextmenu to stay open using ContextMenu.IsOpen = true , then
call ContextMenu.StaysOpen = false in the MouseLeave to close it.
private void AdminButton_MouseEnter(object sender, MouseEventArgs e)
{
(sender as Button).ContextMenu.IsEnabled = true;
(sender as Button).ContextMenu.PlacementTarget = (sender as Button);
(sender as Button).ContextMenu.Placement =
System.Windows.Controls.Primitives.PlacementMode.Bottom;
(sender as Button).ContextMenu.IsOpen = true;
(sender as Button).ContextMenu.StaysOpen = false;
}
private void AdminButton_MouseLeave(object sender, MouseEventArgs e)
{
(sender as Button).ContextMenu.StaysOpen = false;
}
The result is that once I mouse over the button, it stays active and the
submenu exists until I click elsewhere on the screen. I'm pretty confused
by this behavior, shouldn't the ContextMenu.StaysOpen = false close the
submenu?
I've already tried to use both MouseEnter/MouseLeave and the most common
behavior is that the second the cursor comes off the button to access the
submenu, the submenu disappears.
I figure if I can't make these commands work, there must be some way to
suspend the MouseLeave duration so the user can get to the submenu before
it closes???
not many examples on the web concerning this action for a button or
textblock, so any help would be great.
Subscribe to:
Posts (Atom)