-
Постов
363 -
Зарегистрирован
-
Посещение
-
Победитель дней
64
Весь контент OnePeople
-
FileExits не находит файл хотя он есть
OnePeople опубликовал вопрос в Вопросы по языку Object Pascal и RTL
В имени файла есть символ × с ним не находит, как побороть? -
Может кто с питона на делфи переделать это
-
Рано обрадовался один раз прокатило и всё, (Как так??) Кто знает в чем суть шифрования RSASSA-PKCS1-V1_5-SIGN ? Я беру Затем идет шифрование как я понимаю нужно получить SHA256 ключа, с помощью этого же ключа, а затем с помощью полученного ключа уже зашифровать методом RSA то что выше? Или не так? The RSA private key is then passed to the RSA signing function, which also takes the hash type, SHA-256, and the JWS Signing Input as inputs. The result of the digital signature is an octet sequence, which represents a big-endian integer. In this example, it is: Вот как это понять?
-
Спасибо нашел нужные библиотеки в другом месте, наконец-то хотя бы авторизировался)))
-
Итак, зарегистрировал свое приложение, читаю пишут для этих API лучше использовать ауниентификацию через service account, ладно создал. Получил ключ в формате JSON Иии, что теперь понять не могу, зачем такой огород из способов аунтефикации? Помогите разобраться!!! Понял нужен JWT, как сделать RSA256 шифрование?
-
Перерыв интернет так толкого ничего и не нашел пришлось читать майкрософта, может кому пригодиться: Кол-во аудиодорожек и применение:
-
Есть код определяющий количество аудиодорожек в видео procedure TfGeneral.GetSoundStreamsCount; var EnumFilters: IEnumFilters; {The Variables needed for Filter Operations} BaseFilter: IBaseFilter; FilterInfo: TFilterInfo; Klasse:TGuid; begin fVideo.lbAudioStreams.Clear; glb_SoundStreams:=0; {plain } (pFilterGraph as IFilterGraph).EnumFilters(EnumFilters); {Enumerate Filters} While (EnumFilters.Next(1, BaseFilter, nil)=S_OK) do begin BaseFilter.QueryFilterInfo(FilterInfo); BaseFilter.GetClassID(Klasse); if IsEqualGUID(Klasse,CLSID_DSoundRender) then begin glb_SoundStreams:=glb_SoundStreams+1; {counting} AddMenuItem(fVideo.lbAudioStreams,'Audio '+IntToStr(glb_SoundStreams),'','',nil,true); end; end; end; И есть файл в нем две дорожки Одна AC3, вторая DTS. По этому коду находит только DTS, в каком интерфейсе искать вторую?
-
Нет конечно, просто думал вы через них работали
-
Ну если на запуске ложиться значит проблема в коде в секциях cоздания и показа формы OnCreate или OnShow И TetheringManager, AppProfile попробуйте задать им свойство Enabled=false, а в OnShow сделать их true
-
Я просто когда у меня такое было, в OnApplyStyleLookup приравнивал к значению текста через StyleData к объекту.
-
Вот видео в конце все видно, то нормально все, то вот такое проявление белого цвета, не могу понять от чего? Вот код анимации procedure TfGeneral.AnimateLay(TekLay,NewLay:TLayout;lb,fobj:IControl;dtr:Boolean;textdstr,textitle,cat:String); var Hpos,Tpos:Single; begin TekControlUpr:=fobj; TekControlLay:=NewLay; TekControlItemCat:=cat; perehod:=true; BlurTransitionEffect1.Parent:=lOsn; BlurTransitionEffect1.Enabled:=true; BlurTransitionEffect1.Progress:=0; Hpos:= lBottom.Position.Y; Tpos:= lTop.Position.Y; TAnimator.AnimateFloat(lBottom,'Position.Y',Hpos+120,0.35, TAnimationType.Out, TInterpolationType.Linear); TAnimator.AnimateFloat(lTop,'Position.Y',TPos-150,0.35, TAnimationType.Out, TInterpolationType.Linear); TAnimator.AnimateFloatWait(BlurTransitionEffect1,'Progress',100,0.35, TAnimationType.Out, TInterpolationType.Linear); tTitle.Text:=textitle; if dtr=true then begin tAtrib.Text:=textdstr; tAtrib.Visible:=true; end else begin tAtrib.Text:=''; tAtrib.Visible:=false; end; TekLay.Visible:=false; NewLay.Visible:=true; NewLay.BringToFront; if (NewLay=lVideo) or (NewLay=lGames) or ((NewLay=lFileChange) and (FileExists(sViewBtn1.Text))) then AddListPotok.Resume; if NewLay=lMusic then begin rMusicLeft.Position.X:= -rMusicLeft.Width; rMusicRight.Position.X:= rMusicRight.Width+rMusicLeft.Width; lbTekPlaylist.ApplyStyleLookup; lMiniMusicPlayer.Visible:=false; lMiniMusicPlayer.Opacity:=0; end else begin if MusicMode=Playing then begin lMiniMusicPlayer.Visible:=true; TAnimator.AnimateFloat(lMiniMusicPlayer,'Opacity',1,0.35); end; end; TAnimator.AnimateFloat(lBottom,'Position.Y',Hpos,0.35, TAnimationType.Out, TInterpolationType.Linear); TAnimator.AnimateFloat(lTop,'Position.Y',TPos,0.35, TAnimationType.Out, TInterpolationType.Linear); TAnimator.AnimateFloatWait(BlurTransitionEffect1,'Progress',0,0.35, TAnimationType.Out, TInterpolationType.Linear);BlurTransitionEffect1.Progress:=0; BlurTransitionEffect1.Enabled:=false; fobj.SetFocus; TekControlBox:=lb; ShowLay:=NewLay; if AllControlItemIndex>0 then begin TekControlItemIndex:=0; PredControlItemIndex:=0; ChangeControlItem(VNaprControlItemIndex,false,ColumnControlItemIndex); end; perehod:=false; end; pyWorld 2016-05-22 16-15-45-302.rar
-
Парни может хотя бы кто скажет, procedure TForm1.IdUDPServer1UDPRead(AThread: TIdUDPListenerThread; const AData: TIdBytes; ABinding: TIdSocketHandle) должна работать на андроид?
-
Вот что говорит: System.NullReferenceException: Object reference not set to an instance of an object
-
procedure TForm1.IdUDPServer1UDPRead(AThread: TIdUDPListenerThread; const AData: TIdBytes; ABinding: TIdSocketHandle); Ругается на константы. Как заставить работать??? Добавлял для AData в uses idGlobal; Но всё равно с AData ничего не сделать, на все его параметры среда ругается( Вообще у меня Client нормально всё отрабатывает, а на компе сервер отвечает, может как то клиентом можно отловить ответ сервера?
-
Не знаю как в fmx но в vcl при перерисовке в потоке нужно для image использовать команды lock и unlock
-
Спасибо за помощь, не могу завести( Делаю так uses PrinerAPI; var MyPrinter:TMyPrinter; begin if (MyPrinter<>NIL)and(not SameText(MyPrinter.PrinterName, Printer.ActivePrinter.Device)) then FreeAndNil(MyPrinter); MyPrinter:=TMyPrinter.Create(Printer.ActivePrinter.Device,false); MyPrinter.PrinterProperties; Access V в PrinterAPI procedure TMyPrinter.Get_Printer(DevModePtr:PDeviceMode); var pi:TPrinterInfo9; sz:integer; buf:PPrinterInfo9; r:Cardinal; InfoKind:integer; begin sz:=0; CheckError(); pi.pDevMode := DevModePtr; if UseDefaultSettings then InfoKind := 8 else InfoKind := 9; r:=GetLastError; if r<>0 then RaiseLastOSError; if not Winapi.Winspool.GetPrinter(Handle, InfoKind, nil, 0, @sz) then begin r:=GetLastError; if r<>ERROR_INSUFFICIENT_BUFFER then RaiseLastOSError else if sz=8 then // shit happens. windows не говорит, каого размера буфер ей надо ((( sz:=10000; end; buf:=getmemory(sz); try if not Winapi.Winspool.GetPrinter(Handle, InfoKind, buf, sz, @sz) then RaiseLastOSError else SetLastError(0); ---------------------------------------------------------------------------------------------------------- MoveMemory(DevModePtr, buf.pDevMode, buf.pDevMode.dmSize+buf.pDevMode.dmDriverExtra); --ЗДЕСЬ ---------------------------------------------------------------------------------------------------------- finally freeMemory(buf); end; P.S. Извеняюсь всё работает, просто от администратора нужно запускать, ничего манифест добавлю)))
-
Делаю простинькую настройку печати из Memo var m:Single; i,page,pageall:integer; DestRect:TRectF; textFill: tFillTextFlags; stranp:TStringList; pt:Boolean; begin m:= Memo2.Lines.Count-1; pageall:=Round(m) div 67; if Round(m) mod 67>0 then pageall:=pageall+1; textFill := []; Printer.Title := Memo2.Lines.Strings[0]; Printer.Copies := StrToInt(SpinBox1.Text); // Printer.Orientation := poLandscape; stranp:=TStringList.Create; Printer.ActivePrinter:=Printer.Printers[Combobox1.ItemIndex]; Printer.BeginDoc; Printer.Canvas.Font.Size := 14; Printer.Canvas.Font.Family:='Arial'; page:=1; pt:=true; while (not Printer.Aborted) and (Printer.Printing) and (pt) do begin stranp.Clear; for I := 0 to 67 do begin if i+((page-1)*67)<=Memo2.Lines.Count-1 then stranp.Add(Memo2.Lines.Strings[i+((page-1)*67)]+' '+IntToStr(pageall)); end; DestRect := RectF(100,100,(Printer.Pagewidth - 100),(Printer.PageHeight - 100)); Printer.Canvas.FillText(DestRect,stranp.Text,True,1,textFill,TTextAlign.Center,TTextAlign.Leading); Inc(page); if (page <= pageall) and (not printer.aborted) then begin Printer.NewPage; end else begin pt:=false; end; end; Printer.EndDoc; stranp.Free; end; Всё отлично работает, кроме того что я хочу открыть настройки печати самого принтера Printer.ActivePrinter.ShowDeviceOptions; Не работает( Там даже кода нет( И ещё вопрос как узнать состояние принтера готов не готов в WinApi будет GetPrinter(hPrinter, PRINTER_INFO_2... , как в Обезьяне сделать?
-
Платформа: Windows Delphi: Seatle Есть листбокс прокручивается клавишами с клавиатуры. В XE8 был баг и прокрутки своей небыло, делал так scb:=VideoList.FindStyleResource('vscrollbar') as TScrollBar; posIt:= (VideoList.ItemIndex div vidcolumn) * VideoList.ItemHeight; posVer:=scb.Value; posNiz:=scb.Value+VideoList.Height; if posIt>posNiz-VideoList.ItemHeight then begin TAnimator.AnimateFloat(scb,'Value',(VideoList.ItemIndex div 5) * VideoList.ItemHeight-VideoList.Height+VideoList.ItemHeight,0.25); end; if posIt<posVer then begin TAnimator.AnimateFloat(scb,'Value',(VideoList.ItemIndex div 5) * VideoList.ItemHeight,0.25); end; Сейчас прокрутка есть но не плавная, подскажите пожалуйста как сделать плавную или вообще её отключить! P.S. когда не было прокрутки, меня мой вариант устраивал
-
Хотел сделать эффект что бы при наведении Item увеличивался, с Item манимуляции ни к чему не привели так как он оказывается за другими Itemами, сделал создание в ListBox контрола. Все работает но как позиция моего контрола становиться большее 1500 контрол исчезает(( procedure TForm1.VideoListChange(Sender: TObject); var scb:TScrollBar; posVer,posIt,posNiz:Single; po:Real; bmp:TBitmap; begin po:= (VideoList.ItemIndex div vidcolumn)* VideoList.ItemHeight; FocusItem.Position.X:=(((VideoList.ItemIndex mod vidcolumn)* VideoList.ItemWidth))*mashX+9; FocusItem.Position.Y:=(po)*mashY+9; if VideoList.Items.Count-1>=predit then VideoList.ItemByIndex(predit).Opacity:=1; scb:=VideoList.FindStyleResource('vscrollbar') as TScrollBar; posIt:= (VideoList.ItemIndex div vidcolumn) * VideoList.ItemHeight; posVer:=scb.Value; posNiz:=scb.Value+VideoList.Height; if posIt>posNiz-VideoList.ItemHeight then begin TAnimator.AnimateFloat(scb,'Value',(VideoList.ItemIndex div 5) * VideoList.ItemHeight-VideoList.Height+VideoList.ItemHeight,0.15); end; if posIt<posVer then begin TAnimator.AnimateFloat(scb,'Value',(VideoList.ItemIndex div 5) * VideoList.ItemHeight,0.15); end; VideoList.ItemByIndex(VideoList.ItemIndex).StylesData['Rectangle2.Fill.Color']:=$CF0C0C0C; VideoList.ItemByIndex(VideoList.ItemIndex).StylesData['Icon.Opacity']:=1; FocusItem.Align:=TAlignLayout.None; bmp:=TBitmap.Create; bmp.Assign(VideoList.ItemByIndex(VideoList.ItemIndex).ItemData.Bitmap); VideoList.ItemByIndex(VideoList.ItemIndex).Opacity:=0; po:= ( ((VideoList.ItemIndex div vidcolumn)* VideoList.ItemHeight)); FocusItem.Position.X:=(((VideoList.ItemIndex mod vidcolumn)* VideoList.ItemWidth))*mashX+9; FocusItem.Position.Y:=(po)*mashY+9; predit:=VideoList.ItemIndex; ItemIcon.Fill.Bitmap.Bitmap:=Bmp; ItemText.Text:=VideoList.ItemByIndex(VideoList.ItemIndex).ItemData.Text; FocusItem.Width:=VideoList.ItemWidth-18; FocusItem.Height:=VideoList.ItemHeight-18; FocusItem.Visible:=true; FocusItem.Opacity:=1; FocusItem.BringToFront; TAnimator.AnimateFloat(FocusItem,'Width',FocusItem.Width+(14*(FocusItem.Width/FocusItem.Height)),0.25); TAnimator.AnimateFloat(FocusItem,'Height',FocusItem.Height+14,0.25); Title.Text:=FloatToStr(FocusItem.Position.X)+''+FloatToStr(FocusItem.Position.y); TAnimator.AnimateFloat(FocusItem,'Position.X',FocusItem.Position.X-(7*(FocusItem.Width/FocusItem.Height)),0.25); TAnimator.AnimateFloat(FocusItem,'Position.Y',FocusItem.Position.Y-7,0.25); bmp.Free; end;
-
Нет ну это само сабой, просто я думал может есть какой нибудь ключ, для отправки вне основного потока. Почему для таких компонентов сразу так не делать?
-
Отправляю список файлов по WiFi, программа стопориться до конца отправки, как этого избежать?( if AResource.Hint='GetPlayList' then begin try for p := 0 to TetheringManager1.RemoteProfiles.Count-1 do TetheringAppProfile1.SendString(TetheringManager1.RemoteProfiles[p],'MusicClear','1'); except end; for i := 0 to PlayList.Items.Count-1 do begin try for p := 0 to TetheringManager1.RemoteProfiles.Count-1 do TetheringAppProfile1.SendString(TetheringManager1.RemoteProfiles[p],'AddMusic',IntToStr(i)+'.'+PlayList.Items.Strings[i]); except end; end; end;